diff --git a/src/cscli/main.ts b/src/cscli/main.ts index 73d8a56..37e5abe 100644 --- a/src/cscli/main.ts +++ b/src/cscli/main.ts @@ -55,6 +55,16 @@ export default class CSCLI { socket.write(`${res}\n`); socket.destroy(); break; + case 'processcount': + const processCount = await this.client.util.exec(`ps -U ${parsed.Username} -u ${parsed.Username} u | wc -l`); + socket.write(`${processCount}\n`); + socket.destroy(); + break; + case 'sshlogins': + const sshLogins = await this.client.util.exec(`who | grep ${parsed.Username} | wc -l`); + socket.write(`${sshLogins}\n`); + socket.destroy(); + break; default: socket.destroy(); break;