Redirect the output of prstat


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Redirect the output of prstat
# 1  
Old 03-14-2006
Redirect the output of prstat

Hi,

How to redirect the output of prstat command to a file.

Ex:

I want to do like this

while :
do
prstat >> prs.log
sleep 5
done

is it possible ???? if No, then how can i proceed??

PLEASE HELP ME OUT FROM THIS Smilie

Thanks in advance
-----------
VASTARE
# 2  
Old 03-14-2006
until a termination signal is received prstat would continue to process
since in your script you dont pass the signal you would not terminate from that
and no information being dumped,

with refresh count at the rate of 1 second, use the command as follows
Code:
prstat 1 1 

# 3  
Old 03-14-2006
Hey Smilie

Thank you very much Smilie

one more dout sir .........

Can we display the Date/time stamp in history command Smilie
Ex:
$history

output
-----------
vi pr.sh
ksh -x pr.sh
ksh -n pr.sh
nhoup ksh pr.sh &
nohup ksh pr.sh &

i want the output like this

Tue Mar 14 17:18:57 GMT 2006 vi pr.sh HOSTNAME

is it possible sir ????

Thanks in advance
-----------
VASTARE
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to output the prstat into table and send through email?

Hi how to send below prstat script output into table format and send through email? prstat|awk '{ if ($9 >= 5) print $0 }' (17 Replies)
Discussion started by: tharmendran
17 Replies

2. Shell Programming and Scripting

Redirect script output to a file and mail the output

Hi Guys, I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts. I used below but it is not working: OFILE=/home/home1/report1 echo "report1 details" > $OFILE =/home/home1/1.sh > $OFILE echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies

3. Shell Programming and Scripting

Format Top and prstat command output

need help with formatting output of command top and prstat. My requirment is to remove few columns and display remaining . But when i used awk to do that the output seems to be have gone vague, mixing the column values. After using awk to print particular column the output seems to have lost... (1 Reply)
Discussion started by: NarayanaPrakash
1 Replies

4. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

5. Shell Programming and Scripting

How to print prstat -Z output into a file?

Hi Expert, I want to print CPU and Memory utilization into a text file. I am using "prstat -Z" to see the output on screen. When I run below command prstat -Z | grep httpd | awk '{print$3} '>> output.txt but it is not printing to file. Also I want to be below header on output PID USERNAME ... (6 Replies)
Discussion started by: lalit kumar
6 Replies

6. Shell Programming and Scripting

Output of prstat for 60 secs

Hi, I want to fire the prstat command which should run fro 60 secs and get the report into a text file using a script. I just know the command: prstat -c >> log.txt which will run until we stop it. But i want the script to run only for 60 sec,print the output to text file and stop... (3 Replies)
Discussion started by: nessj
3 Replies

7. Shell Programming and Scripting

prstat output

hi all, have a ksh script where i am doing a prstat -m -u osuser 1 1 >> $FILE_NAME but for some reason it only writes 15 lines wheres when i run the same command manually from command prompt it prints out 60 lines. why is it not writing the full 60 lines to the file ?? ta. (1 Reply)
Discussion started by: cesarNZ
1 Replies

8. Solaris

prstat output

Can someone please explain me the "TIME" field of the output of "prstat -p<pid>" command ? The man page says it is "The cumulative execution time for the process". Does it mean how many hrs:min:sec the process is running ? If so then I'm not getting the desired output. Can someone pls help me in... (5 Replies)
Discussion started by: senabhi
5 Replies

9. Shell Programming and Scripting

prstat output in GB

Hi, Is there any way by which the unit of size and rss will be only GB while I am running the prstat command? (2 Replies)
Discussion started by: King Nothing
2 Replies

10. Shell Programming and Scripting

Redirect Output

Hi, I would like to list files: ls *.hdf But I would like a copy of the output directed to the screen, but also APPENDED to a text file: test.txt I have tried: ls *.hdf | tee test.txt However, that will just write over everything already existing in test.txt. How can I append the... (1 Reply)
Discussion started by: msb65
1 Replies
Login or Register to Ask a Question