Blog Archives

 

Oct
8

0


Linux has a reputation for robustness but there are still plenty of ways to damage a perfectly working system. Here we share some of the ways you can trash Linux. 01. Fill a filesystem If the filesystem containing /var fills up, nothing can write its log messages and all sorts of system processes may stall. This can be caused by a runaway process spamming /var/log or, if everything is on the same filesystem, it could be all the downloads in your home directory. 02. Reinstall Windows No, this isn’t a typical Linux user’s anti-Microsoft jibe – the Windows installer doesn’t allow for foreign operating systems or bootloaders, so if you reinstall Windows it will overwrite your bootloader. There’s no need to reinstall Linux, though: the installer CD usually has an option to fix the bootloader, or you can run grub-install from a live CD. 03. Run out of memory 4
Read More...

Jun
23

Swap Watch

Posted in Linux by Admin

0


Every so occasionally a process or two (I’m looking at you, apache) gets a little out of hand and swallows up a crapload of RAM.  Well, those of us on a budget rent servers with very little available memory and running out of it can quickly bring your server to a halt.  Throw this little script into a 15 minute cronjob and you’ll get emailed when your server starts using more than 20% of its swap. #!/bin/sh free -m | grep Swap | while read output; do swap=$(echo $output | awk '{print $2}' ) used=$(echo $output | awk '{ print $3 }' ) freed=$(echo $output | awk '{ print $4 }' ) echo "Swap : $swap" echo "Used : $used" echo "Free : $freed" usep=`expr $used \* 100 / $swap` echo $usep if [ $usep -ge 20 ]; then echo "Swap Usage Alert Total Swap: \"$swap\" Used: \"$used ($usep%)\" Free: \"$freed\" on $(hostname) as on $(date)" | mail -s "Alert: Swap Usage space $usep%"
Read More...


Switch to our mobile site