[CentOS] top command
Hi, I am running CentOS 6.4 on a remote server. when i run the below command, it prints out the headers too. is there a way to remove headers using the below command line *top -b -p 22657 topcpu.txt* Regards, Kaushal ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] top command
On 24/10/2013 12:20, Kaushal Shriyan wrote: Hi, I am running CentOS 6.4 on a remote server. when i run the below command, it prints out the headers too. is there a way to remove headers using the below command line *top -b -p 22657 topcpu.txt* Perhaps the 'ps' command in a sleep 3 loop is more suited for what you're looking for? -- Regards, Giles Coochey, CCNP, CCNA, CCNAS NetSecSpec Ltd +44 (0) 8444 780677 +44 (0) 7983 877438 http://www.coochey.net http://www.netsecspec.co.uk gi...@coochey.net ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] top command
On Thu, Oct 24, 2013 at 4:53 PM, Giles Coochey gi...@coochey.net wrote: On 24/10/2013 12:20, Kaushal Shriyan wrote: Hi, I am running CentOS 6.4 on a remote server. when i run the below command, it prints out the headers too. is there a way to remove headers using the below command line *top -b -p 22657 topcpu.txt* Perhaps the 'ps' command in a sleep 3 loop is more suited for what you're looking for? Hi Giles, Thanks for the quick reply. Any example for ps command as per your advice? Regards, Kaushal -- Regards, Giles Coochey, CCNP, CCNA, CCNAS NetSecSpec Ltd +44 (0) 8444 780677 +44 (0) 7983 877438 http://www.coochey.net http://www.netsecspec.co.uk gi...@coochey.net ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] top command
On 24/10/2013 13:29, Kaushal Shriyan wrote: On Thu, Oct 24, 2013 at 4:53 PM, Giles Coochey gi...@coochey.net wrote: On 24/10/2013 12:20, Kaushal Shriyan wrote: Hi, I am running CentOS 6.4 on a remote server. when i run the below command, it prints out the headers too. is there a way to remove headers using the below command line *top -b -p 22657 topcpu.txt* Perhaps the 'ps' command in a sleep 3 loop is more suited for what you're looking for? Hi Giles, Thanks for the quick reply. Any example for ps command as per your advice? Regards, Kaushal If you're looking for CPU usage examine the output of: ps -p 22657 --no-headers -o %C If that is what you're looking for then stick it in a bash script loop that repeats the command at your required frequency (hint: use sleep to pause a few seconds and check the ps manual page for other output (e.g. memory usage) that you might also want. -- Regards, Giles Coochey, CCNP, CCNA, CCNAS NetSecSpec Ltd +44 (0) 8444 780677 +44 (0) 7983 877438 http://www.coochey.net http://www.netsecspec.co.uk gi...@coochey.net ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] top command
From: Kaushal Shriyan kaushalshri...@gmail.com I am running CentOS 6.4 on a remote server. when i run the below command, it prints out the headers too. is there a way to remove headers using the below command line *top -b -p 22657 topcpu.txt* If you want to stick to top: top -b -p 22657 | grep -v '^[a-z ]\|^$' JD ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos