hi,
here a technical question about execution / result of a command line in bash
i try to get the total CPU usage on my server by doing
echo top -n 1 -b | grep Cpu | tr -d '%id,' | awk '{print $5}'
but the result is always the same as the first time you use this command or what ever command. i tried sar, vmstat, iostat, sysstat, and i got the same problem.
any idea to get the result updated ?
here a technical question about execution / result of a command line in bash
i try to get the total CPU usage on my server by doing
echo top -n 1 -b | grep Cpu | tr -d '%id,' | awk '{print $5}'
but the result is always the same as the first time you use this command or what ever command. i tried sar, vmstat, iostat, sysstat, and i got the same problem.
any idea to get the result updated ?