10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have one file which contains time for request and response.
I want to calculate time difference in milliseconds for each line.
This file can contain 10K lines.
Sample file with 4 lines.
for first line.
Request Time: 15:23:45,255
Response Time: 15:23:45,258
Time diff... (6 Replies)
Discussion started by: Raza Ali
6 Replies
2. Linux
Hi,
I want to calculate the total cpu usage from the sar report. Say for example,
Linux 2.6.24-21-generic (blade10) 09/10/2012
04:54:36 PM CPU %user %nice %system %iowait %steal %idle
04:54:37 PM all 0.00 0.00 0.00 0.00 ... (1 Reply)
Discussion started by: rohitmd
1 Replies
3. AIX
Could you please explain about calculate CPU utilization of aix server using lparstat command?
Here below i have provided example output from aix test server.
System configuration: type=Shared mode=Uncapped smt=On lcpu=4 mem=4096 psize=63 ent=0.50
%user %sys %wait %idle physc %entc ... (1 Reply)
Discussion started by: maruthu
1 Replies
4. UNIX for Dummies Questions & Answers
Hi.
For an homework, I have to simulate some part of the PS function. By reading the doc I've been able to find most of it but I don't how I can get the %cpu for each PID.
I've read on Internet that I have to do:
(utime(t)-utim(t-1))/(cputime(t)-cputime(t-1))
where cputime is the sum of... (2 Replies)
Discussion started by: elnabo
2 Replies
5. Shell Programming and Scripting
Hello Guys,
I am trying to calculate total hours and minutes a given user has used the system since the beginning of the current month.
#!/usr/bin/sh
hr=0
min=0
last $1 | grep -w `date "+%b"` | grep -v '\(0:.*\)' | grep -vw sshd | cut -c 66-
| tr -d "\(\)" | cut -f1 -d ":" | grep -v '.*' |... (9 Replies)
Discussion started by: kasparov
9 Replies
6. Shell Programming and Scripting
Hello,
I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes...
I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes.
To do... (10 Replies)
Discussion started by: worm
10 Replies
7. Shell Programming and Scripting
Hello All,
I have a problem calculating the time difference between start and end timings...!
the timings are given by 24hr format..
Start Date : 08/05/10 12:55
End Date : 08/09/10 06:50
above values are in mm/dd/yy hh:mm format.
Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies
8. Shell Programming and Scripting
I thought a program's elapsed time, some program language call it real time, should be the time of a program from start to finish. And it should be equal or longer than CPU time. This is true for the most of the cases. However, I do see some of my programs CPU time is longer than Elapsed time. ... (1 Reply)
Discussion started by: visio2000
1 Replies
9. UNIX for Dummies Questions & Answers
hello
i want to display the time firstly when i run my shell script and after 25 min i want to display a message it says that the time left is 5 min. When the calculated time is 30 mins, the script should exit.
can any one help me with that!
Thanks in advance
Regards
:o (5 Replies)
Discussion started by: dndoon
5 Replies
10. Shell Programming and Scripting
I have written a script that will calculate CPU usage and Memory usage of a particular process on AIX Unix. I know the PID and I am using the command --
# for CPU Usage
MSG_CPU_USG=`ps uax | grep ${PID} | awk {'print $3'}`
#for Memory Usage
MSG_MEM_USG=`ps uax | grep ${PID} | awk {'print... (0 Replies)
Discussion started by: asutoshch
0 Replies