Created
December 5, 2016 21:30
-
-
Save petersirka/c47d5cf9b213e5ca6142bbebdf0132cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
console.log(cmd); | |
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