Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-10-2012, 06:19 AM   #1
LQ Newbie
Registered: Jun 2012
Posts: 7

Rep: Reputation: Disabled
Solaris to Linux porting (prstat -Z -n 1 1 1 ----command help)


I need the equivalent of `prstat -Z -n 1 1 1` command in Linux.

My script is something like this:

$prstat_out=`prstat -Z -n 1 1 1`;
@lines = split (/\n/, $prstat_out);
foreach $line (@lines){
if ($line =~ /(\s+)(\d+)(\s+)(\d+)(\s+)(\d+.*)(\s+)(\d+.*)(\s+)(\d+)%(\s+)(.*).*).*)(\s+)(.*)% global/){

print "The CPU usage is $proc_usage ";

This will print the CPU usage in percentage in Solaris.

Can anybody help me in knowing the equivalent in Linux.

Old 07-11-2012, 04:27 PM   #2
Registered: Oct 2011
Location: USA
Distribution: Red Hat
Posts: 259
Blog Entries: 9

Rep: Reputation: 32
The command you'd want is top.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the Linux equivalant commands of Solaris' prstat & ptree? parunachalam Linux - Newbie 2 12-08-2011 07:25 PM
solaris to linux porting vinod_indus Linux - General 3 09-12-2005 11:51 AM
Porting from Solaris to Linux gan_04 Linux - General 2 07-15-2005 09:37 AM
Porting from Solaris to Linux raees Linux - General 3 11-10-2003 10:26 AM
Porting from Solaris 2.6 to Linux rajneesh_134 Solaris / OpenSolaris 1 10-22-2003 10:20 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration