LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   looking for prstat -m command equivalent in Linux (https://www.linuxquestions.org/questions/linux-newbie-8/looking-for-prstat-m-command-equivalent-in-linux-4175528484/)

learningShellScript 12-16-2014 04:15 PM

looking for prstat -m command equivalent in Linux
 
Hi Folks,

I'm relatively new to Linux world and I'm learning shell scripting. I've a shell script working well in Solaris system that uses prstat command. After a lot of research, I found out that top is equivalent to prstat in Linux platform.
1. top -b -d 1 -n 1 | head -207 // in linux
2. prstat -n200 1 1

Are the above two commands equivalent?
Also, I'm looking for a command that is close to the command:
prstat -m -n200 1 1
I've been looking for a similar command in linux, and couldn't find any. Please help.

TB0ne 12-16-2014 04:46 PM

Quote:

Originally Posted by learningShellScript (Post 5285768)
Hi Folks,
I'm relatively new to Linux world and I'm learning shell scripting. I've a shell script working well in Solaris system that uses prstat command. After a lot of research, I found out that top is equivalent to prstat in Linux platform.
1. top -b -d 1 -n 1 | head -207 // in linux
2. prstat -n200 1 1

Are the above two commands equivalent?

The best way to figure that out is to run them, and compare the output. Also, if you're new to Linux, you should check out the Unix Rosetta Stone:
http://bhami.com/rosetta.html
Quote:

Also, I'm looking for a command that is close to the command:
prstat -m -n200 1 1
I've been looking for a similar command in linux, and couldn't find any. Please help.
Honestly, the man pages would be your best place to start. Read the man page on prstat, and on top. Compare the flags/switches, and see if any do what you're after. It's an arduous process, to be sure, but it WILL help you learn quickly.

It looks like the top command is only one of the Linux commands that may replace prstat. Check out the others on the Rosetta stone.


All times are GMT -5. The time now is 01:56 AM.