Operating System - HP-UX
1831645 Members
2019 Online
110029 Solutions
New Discussion

any known problems with dd using 10.20?

 

any known problems with dd using 10.20?

I had a system panic on Monday. Some people are telling me a dd command that a script has been doing for the last year every 2 hours on 3 of our production boxes caused one fo those boxes to crash. That makes no sense to me!!! Her is the section from the script that uses it.

cpu=`sar -u -s${prevhour}:00:00 -e${currhour}:05:00 | tail -3 | head -1| a
wk '{print $NF}'`
cpu=`expr 100 - $cpu`
totmem=`dd if=/dev/mem of=/dev/null bs=1024k 2>&1 | tail -1 | cut -d+ -f1`
totmem=`expr $totmem \* 1024`
freemem=`/usr/bin/vmstat -n | head -4 | tail -1 | awk '{print $2}'`
freemem=`expr $freemem \* 4`
percmem=`expr $freemem \* 100 / $totmem`
percmem=`expr 100 - $percmem`
load=`/usr/bin/uptime | sed -e "s/^.*load average://" -e "s/ *//g"`
echo "${host},${now},${load},${freemem},${cpu},${percmem}" > /sqlmnt/tmp/$
{server}load.csv

Again, remember, this script is run every 2 hours on 3 boxes for over a year now, why would it just now cause one to crash?!?!?!
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: any known problems with dd using 10.20?

Sheri:

I don't think your 'dd' to obtain the amount of memory is a problem. I've seen technique used before in other forms.

...JRF...
Tyrone Kimp
New Member

Re: any known problems with dd using 10.20?

sheri

Is the disk attached to a storage area network or fiber disk? If so there is a problem with dd and fiber on 10.20.



Tyrone
tkimp@allstate.com
STK9840 fiber drives
Dave Echols
Occasional Advisor

Re: any known problems with dd using 10.20?

Chris
I just had the same problem with the only clue the same type dd execution around the time of the crash. What turned out to be the root cause of the problem? Was the dd the straw that broke the camel's back or what?

Dave
harry d brown jr
Honored Contributor

Re: any known problems with dd using 10.20?

The last time that user replied to anything was November 17, 2000. So I doubt you will get any response from them.

live free or die
harry
Live Free or Die
Dave Echols
Occasional Advisor

Re: any known problems with dd using 10.20?

Chris
After experiencing the same problem twice on separate systems within a month and thinking the dd statement was the problem and not knowing for sure, the Response Center has confirmed the theory. They say that at 10.X the HP-UX memory driver is not multi-process safe. Therefore if there is more than 1 simultaneous direct access to /dev/mem the system can panic. While the dd if=/dev/mem, etc. process is running (and it does take some time to finish) we have a vulneralble period where that 2nd access to /dev/mem can cause the panic. Another potential problem is running Q4 on the live system files as that would constitute direct access to /dev/mem. However, it is perfectly OK to run Q4 on data in the crash directory since that is not live data. Anyone on 11.X can disregard this because your systems are beyond this problem