calculate server uptime in % (99.98), using ksh script
Let me preface by saying, I have looked through many threads that deal with keep the decimal, however I'm not sure that any one resolution meets my needs, ok, ok, they could. So maybe it's just that I am not understanding the resolution - therefore I am posting a new thread.
myknowledgebase=at times seems pretty insufficient
system=AIX
version=5.3.0.60
script lang.=ksh
description -
I have been task with automating the calculation of server uptime.
1. I have a control that is manually updated with server downtime in
minutes.
2. I have a script that pulls out the minutes and tries to run them through
the calculation.
3. I tried to "| bc -l" at the end of my calculations, which gives errors of
improper syntax (man bc - not an easy read) find it hard to determine
what the syntax should be.
4. Never was really good with math
control file looks like -
meat & potatoes -
scripts output -
./calctotmin.ksh
535
41225
0
0
Need more info? Let me know, and thanks for the help.
Hi
One of our server is showing the uptime 0hr 5mints
there is no log in /var/log/messages
there is no log in command "last"
kernel version is 2.4.9 (RH2.1 AS)
What could be the reason for this. is this issue is related to uptime counter reached max
how to verify this.
Best Regards
KVK (4 Replies)
I am unable to get this KSH script to work. Can someone help. I've been told this should work with KSH93. Which I think I have on Solaris 10.
If I do a grep -i version /usr/dt/bin/dtksh I get
@(#)Version M-12/28/93d
@(#)Version 12/28/93
@(#)Version M-12/28/93
This is correct for... (5 Replies)
What is the uptime command output when the server is running more than one year?
My doubt is whether it show in number of days format or number years and number of days format?
For example, Assume the server is running 400 days 3 hrs 3 min 3 secs. The output like 400 days 3:3 min or 1 year 5... (3 Replies)
Hi!
I want to extract the uptime from the output of the uptime command.
The output:
11:53 up 3:02, 2 users, load averages: 0,32 0,34 0,43
I just need the "3:02" part. How can I do this?
Dirk (6 Replies)
how to find out total number of users logged in a server from uptime . i mean to say i need the total output of unix command . who gives the out put at a particular time . I need at all time from which machine who has connected , (3 Replies)
I have a script that runs fine under my home directory. No syntax errors, runs and returns as expected.
When I migrate the script to the UAT directories on the same server for User testing, I get a syntax error.
I've checked to make sure the .profile I'm using is the same in the UAT... (1 Reply)
Hello,
I would like to create a report every month about the working hours of some servers.
I need to get results such as how long are the servers up every month, which hours/days are up.
Do you know any tool which will help me?
Thanks in advance (2 Replies)
Hi all,
Can any one help me.......
I just want to run one shell script whenever i am rebooting the server. Is there any easy way to do that????
Thanks,
selva (7 Replies)
Within a ksh script on HP-UX I trying to calculate a percentage of a number (number/100 x percentage) using the below method and expr.
TARPERC=`expr 16 / 100 \* 5`
TARSUM=`expr 16 + $TARPERC`
ZIPSUM=`expr $TARSUM \* 2`
If the input is 16
outputs are:
TARPERC: 0
TARSUM: 16
ZIPSUM: 32... (6 Replies)