[CALUG] Strange behaviour

Jim Sansing jjsansing at verizon.net
Tue Jun 4 18:23:35 EDT 2013


Here is what my uptime command displays usually:

18:20:20 up 160 days, 23:59,  1 user,  load average: 0.09, 0.10, 0.05

Here is what is displays at the time of day when it was last booted:

18:20:25 up 161 days, 0 min,  1 user,  load average: 0.08, 0.09, 0.05

Your "cut -d':' -f4" has the wrong number of ":"s.

Later . . .   Jim

ps.  What luck that I looked at my uptime starting at 160 days, 23:56 ;-)


Rajiv Gunja wrote:
> This is not on Linux, but on Solaris/Unix.
>  
> I have a few servers on which I am running a few commands via cron.
> Examples commands: date, uptime, sar, netstat, dladm, prstat, ping.
>  
> Here is the command sequence I am having the issue:
>
> ldavg=`uptime | cut -d":" -f4`
>
> DDATE1=`date +'%Y.%d.%h.%H.%M.%S'`
>
> echo "$DDATE1 >>> $ldavg" >> /var/adm/save/2ping/load.avg.log 2>&1
>
> In the log file, on some servers, once every hour, it will miss output
> of the variable $ldavg. So the entried will look like this :
>  
>
> 2013.04.Jun.07.23.24 >>> 1.12, 1.23, 1.25
>
> 2013.04.Jun.07.24.29 >>> 1.03, 1.18, 1.23
>
> 2013.04.Jun.07.25.35 >>> 1.10, 1.18, 1.22
>
> 2013.04.Jun.07.26.40 >>> 1.45, 1.30, 1.26
>
> 2013.04.Jun.07.27.45 >>>
>
> 2013.04.Jun.07.28.50 >>> 1.10, 1.23, 1.24
>
> 2013.04.Jun.07.29.55 >>> 1.08, 1.20, 1.23
>
> 2013.04.Jun.07.31.01 >>> 1.66, 1.29, 1.26
>
> 2013.04.Jun.07.32.06 >>> 1.27, 1.25, 1.25
>
>  
> I have no explanation as to why this would miss and that too at
> exactly that time every hour. My script runs these commands once a
> minute, every hour.
>  
> (Don't throw up your hands, I am trying to find what is causing
> slowness and sometimes, makes the server go out of the network).
>  
> I have seen load average reach 577, at which point, even the
> /var/adm/messages, sulog does not get updated.
> How can I debug this issue? Please advise.
> Thanks
>  
> -GG
> Rajiv G Gunja
> ------------------------------------------------------------------------
>
> _______________________________________________
> CALUG mailing list
> CALUG at unknownlamer.org
> http://lists.unknownlamer.org/listinfo/calug
>   



More information about the CALUG mailing list