new cmds for cscli
parent
5e022b523a
commit
51ba72ff08
|
@ -55,6 +55,16 @@ export default class CSCLI {
|
||||||
socket.write(`${res}\n`);
|
socket.write(`${res}\n`);
|
||||||
socket.destroy();
|
socket.destroy();
|
||||||
break;
|
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:
|
default:
|
||||||
socket.destroy();
|
socket.destroy();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue