# system hanging every night



## alsuki (Apr 28, 2010)

Hello everyone.

I have a big problem.
I've installed my computer about a month ago and sometimes during the night the computer hangs. I've locked at the logs but nothing there that can be related to this problem.

computer specs:
AMD athlon x2 5400 8 GB of ram
80 GB HDD pata 
1,5 TB HDD sata
1,0 TB HDD sata
250 GD HDD sata
250 GB HDD sata
1,0 TB HDD usb
2x realtek ethernet pci
1x realtek ethernet on board.

my rc.conf

```
#################################################################
# FreeBSD config file
# Autor: 
# Data: Dom 25 Abril 2010
#################################################################

hostname="gaia.alsuki.ath.cx"

# Placas de rede
network_interfaces="rl0 rl1 lo0"
ifconfig_rl0="inet 192.168.0.10/24"
ifconfig_rl1="inet 10.170.14.9/24"
ifconfig_rl1_alias0="10.170.14.3/24"
ifconfig_rl1_alias1="10.170.14.2/24"
ifconfig_rl1_alias2="10.170.14.5/24"
ifconfig_rl1_alias3="10.170.14.6/24"
ifconfig_rl1_alias4="10.170.14.250/24"
#ifconfig_re0=""

defaultrouter="192.168.0.1"

# Configuracao da firewall
gateway_enable="YES"
pf_enable="YES"
pf_rules="/etc/pf.conf"
pf_flags=""
#pflog_enable="YES"
#pflog_logfile="/var/log/pflog"
#pflog_flags=""

# Activacao das jaulas
ezjail_enable="YES"

# Activacao do ZFS
zfs_enable="YES"

# Activar NFS
rpcbind_enable="YES"
nfs_server_enable="YES"
nfs_flags="-t -u -n 16"
mountd_flags="-r"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"

# Activacao de servicos
sshd_enable="YES"
usbd_enable="YES"
devd_enable="YES"
devfs_system_ruleset="devfrules_common"
ldconfig_paths="/usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg"

# Desactivar Sendmail
sendmail_enable="NONE"

# Activar o rato
mouse_type="auto"
moused_enable="YES"

# Melhoramentos FSCK
fsck_y_enable="YES"
background_fsck="NO"

# Activar HAL / DBUS
dbus_enable="YES"
polkitd_enable="YES"
hal_enable="YES"

# Activar som
snddetect_enable="YES"
mixer_enable="YES"

# Activar avahi_daemon
avahi_enable="YES"

#activar swapmoitor
swapmonitor_enable="YES"

keymap="pt.iso.acc"

syslogd_flags="-s -s"
syslogd_flags="-a 10.170.14.9"

# Configuracao NTP
ntpdate_enable="YES"
```

Can anyone help me with this problem? or suggest some login tool so I find out what is happening?


----------



## graudeejs (Apr 28, 2010)

shouldn't aliases have /32 ?


----------



## DutchDaemon (Apr 28, 2010)

They should (when in the same subnet as the primary address). Does not explain the hang, but it's good to get the config right to start with.

OP: what is "sometimes during the night"? Same night every week? Same time every night? Anything in logfiles?


----------



## SirDice (Apr 28, 2010)

Does this happen around 3am? You don't have any sendmail running, not even local-submit-only. periodic(8) probably tries to mail but fails. This shouldn't hang the system but perhaps it does fill up a filesystem.


----------



## DutchDaemon (Apr 28, 2010)

Use 
	
	



```
sendmail_enable="NO"
```
 instead of 
	
	



```
sendmail_enable="NONE"
```
Run [cmd=]/etc/rc.d/sendmail start[/cmd], and make sure your root email is aliased somewhere (or read your root mailbox every day).

That way you will at least see any errors your system reports when running daily/weekly jobs (periodic(8)).


----------



## Ruler2112 (Apr 28, 2010)

I had this same type of problem on one of my slackware boxes running as a video surveillance server.  Turned out that one of the disks in the software RAID-0 had bad sectors and slocate (I think) when it scanned the file system to build a database of files would take the system down when it hit that spot.  I found it by an fsck of the RAID and then calculated out which drive it was on, but it was something that had me confused at first.


----------



## mdhughes (Apr 29, 2010)

I would look at the output of your power supply and see if it can handle that many drives and the three NICs you have.


----------



## User23 (Apr 29, 2010)

Well, the op should tell us what his system is doing every night. It isnt that easy to read in a crystal ball .


----------



## Ruler2112 (Apr 29, 2010)

User23 said:
			
		

> Well, the op should tell us what his system is doing every night. It isnt that easy to read in a crystal ball .



Sure it is... mine is telling me to leave work and take my boat out fishing right now!   :e


----------



## alsuki (Apr 30, 2010)

*[Solved] system hanging every night*

Thanks everyone.

I didn't reply earlier because I was certain that it had worked.
Has been 2 nights and the system is still working.

What solved the problem was 

```
sendmail_enable="YES"
```

About other speculations: my system has a brand new power supply no more that 3 days old.

Has I've said, thanks for the help.


----------

