Skip to content

Instantly share code, notes, and snippets.



Created Dec 5, 2016
What would you like to do?
const Exec = require('child_process').exec;
var cmd = 'ps aux | grep "mysql" | grep -v "grep" | awk {\'print $2\'}';
Exec(cmd, function(err, response) {
var pid = response.trim();
cmd = 'ps -p {0} -o %cpu,rss,etime'.format(pid);
Exec(cmd, function(err, response) {
console.log('---> POSLAT SIROVI:', arguments);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment