diff options
-rwxr-xr-x | host-control | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/host-control b/host-control index 8302e40..478aaa0 100755 --- a/host-control +++ b/host-control @@ -25,6 +25,7 @@ class host_control(): " system-info show kernel info\n" \ " system-shell access system shell\n" \ " system-ping ping host system\n" \ + " system-top show top running tasks\n" \ " system-update update system\n" \ " system-restart restart system\n" \ " system-initramfs-update update system initramfs\n" \ @@ -423,6 +424,14 @@ class host_control(): self.command_call(command) + def system_top(self, host): + if "top" in host: + command = [ host["top"] ] + else: + command = [ "htop" ] + + self.host_call(host, command) + def system_update(self, host): address = self.ssh_address(host) @@ -523,6 +532,8 @@ class host_control(): return self.system_shell(host) elif action == "system-ping": return self.system_ping(host) + elif action == "system-top": + return self.system_top(host) elif action == "system-update": return self.system_update(host) elif action == "system-restart": |