Possible bug in /usr/bin/script? (was A Sleeping FreeBSD Box (again).)
nicky wrote: Hello, This morning i had another 'sleeping' 6-stable box. I don't really understand why it sleeps. I've checked acpi, but i doubt that is it. Since at the time when it goes to sleep, it does some heavy processing. I don't think it would choose to go to sleep then. The most funny thing is, when you go to the console. You press Enter, just Enter, you don't login, just punch the Enter button and the box continues where it stopped. I typed in 'top' as soon as i could, which showed the table below. The script commands capture the output of some shells scripts. last pid: 59391; load averages: 13.19, 4.43, 2.70 up 14+17:21:56 08:43:04 93 processes: 15 running, 78 sleeping CPU states: 5.7% user, 0.0% nice, 44.3% system, 0.0% interrupt, 50.0% idle Mem: 433M Active, 1577M Inact, 194M Wired, 158M Cache, 112M Buf, 644M Free Swap: 8192M Total, 320K Used, 8192M Free PID USERNAME THR PRI NICE SIZERES STATE C TIME WCPU COMMAND 58989 root1 1270 1340K 764K RUN0 504:42 38561.75% script 58986 root1 1270 1340K 764K RUN0 504:41 38547.86% script 58988 root1 1310 1340K 764K RUN0 1:07 438.67% script 58990 root1 1310 1340K 764K RUN2 0:43 337.69% script 58987 root1 1260 1340K 764K RUN2 0:50 249.75% script Is it safe for me to assume that something is hogging my cpu, not allowing any other processes to get some cpu time? As a result the box does not respond to anything, like pinging? Or does top has a weird way of showing the cpu times when it has been sleeping? While i still find it rather weird, that pressing Enter seems to solve it. I hope someone can send some advice or hints my way. Regards, Nick While trying to find out what is eating my CPU and probably making my box sleep. I've found something weird with /usr/bin/script. Assume the following small sh script called sleep.sh. #!/bin/sh while [ 1 ]; do sleep 3 echo "slept" done I'm executing the following: script outputfile ./sleep.sh Executed from a terminal window, all is as i would have expected. No CPU hogging and doing like it should. However if i execute it from cron, my CPU is used to the full 100%. Is this a bug and should i report it? Regards, Nick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
A Sleeping FreeBSD Box (again).
Hello, This morning i had another 'sleeping' 6-stable box. I don't really understand why it sleeps. I've checked acpi, but i doubt that is it. Since at the time when it goes to sleep, it does some heavy processing. I don't think it would choose to go to sleep then. The most funny thing is, when you go to the console. You press Enter, just Enter, you don't login, just punch the Enter button and the box continues where it stopped. I typed in 'top' as soon as i could, which showed the table below. The script commands capture the output of some shells scripts. last pid: 59391; load averages: 13.19, 4.43, 2.70 up 14+17:21:56 08:43:04 93 processes: 15 running, 78 sleeping CPU states: 5.7% user, 0.0% nice, 44.3% system, 0.0% interrupt, 50.0% idle Mem: 433M Active, 1577M Inact, 194M Wired, 158M Cache, 112M Buf, 644M Free Swap: 8192M Total, 320K Used, 8192M Free PID USERNAME THR PRI NICE SIZERES STATE C TIME WCPU COMMAND 58989 root1 1270 1340K 764K RUN0 504:42 38561.75% script 58986 root1 1270 1340K 764K RUN0 504:41 38547.86% script 58988 root1 1310 1340K 764K RUN0 1:07 438.67% script 58990 root1 1310 1340K 764K RUN2 0:43 337.69% script 58987 root1 1260 1340K 764K RUN2 0:50 249.75% script Is it safe for me to assume that something is hogging my cpu, not allowing any other processes to get some cpu time? As a result the box does not respond to anything, like pinging? Or does top has a weird way of showing the cpu times when it has been sleeping? While i still find it rather weird, that pressing Enter seems to solve it. I hope someone can send some advice or hints my way. Regards, Nick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: A Sleeping FreeBSD Box.
Check the BIOS power management settings. -Derek At 03:54 AM 10/30/2006, nicky wrote: Hello all, I've got a 'weird' problem and i hope someone get point me in the right direction to a proper solution. Somehow, i have no idea why, but my production server falls asleep. It has happened twice now in the last week. When 'sleeping' the box doesn't respond to any outside network related communication, like pinging, etc. However, when i login through the console. It comes alive and responds to everything again, just like normal. It even continues processes that were running before it fell 'asleep', which is why i assume they are suspended during nap time. The server has been up and running since August, never had any problems with it before. I've checked all logs etc, so far i can't see anything as to why it would fall asleep. I figured that even if there is such a thing as hibernation on FreeBSD it would turn up in a log, but i've not seen it so far. Does anyone have any idea's/hints on where to look?? FreeBSD version is 6-Stable. Greetz, Nick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: A Sleeping FreeBSD Box.
On Monday 30 October 2006 03:54, nicky wrote: > Hello all, > > I've got a 'weird' problem and i hope someone get point me in the right > direction to a proper solution. > > Somehow, i have no idea why, but my production server falls asleep. It > has happened twice now in the last week. When 'sleeping' the box doesn't > respond to any outside network related communication, like pinging, etc. > However, when i login through the console. It comes alive and responds > to everything again, just like normal. It even continues processes that > were running before it fell 'asleep', which is why i assume they are > suspended during nap time. > > The server has been up and running since August, never had any problems > with it before. I've checked all logs etc, so far i can't see anything > as to why it would fall asleep. I figured that even if there is such a > thing as hibernation on FreeBSD it would turn up in a log, but i've not > seen it so far. > > Does anyone have any idea's/hints on where to look?? > > FreeBSD version is 6-Stable. > > > Greetz, > > Nick > Nick, check out man acpi there are some tunables that you can put in /etc/sysctl.conf to turn off certain power management items during boot. lane ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
A Sleeping FreeBSD Box.
Hello all, I've got a 'weird' problem and i hope someone get point me in the right direction to a proper solution. Somehow, i have no idea why, but my production server falls asleep. It has happened twice now in the last week. When 'sleeping' the box doesn't respond to any outside network related communication, like pinging, etc. However, when i login through the console. It comes alive and responds to everything again, just like normal. It even continues processes that were running before it fell 'asleep', which is why i assume they are suspended during nap time. The server has been up and running since August, never had any problems with it before. I've checked all logs etc, so far i can't see anything as to why it would fall asleep. I figured that even if there is such a thing as hibernation on FreeBSD it would turn up in a log, but i've not seen it so far. Does anyone have any idea's/hints on where to look?? FreeBSD version is 6-Stable. Greetz, Nick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"