PDA

View Full Version : Tips to avoid uneeded reboots on Linux


acal3000
06-28-2008, 06:17 PM
AS you know I don't like excesive rebooting of my system I let weeks without a single reboot unless I use grub to boot my other distro partition or other things ro shutdown my system to clean the dust apart of that I don't reboot for long time but even with cases that even this on Linux can't be avoided and you will need a reboot no matter wehjat you do happen genrally the the hd is contantly loading

I have noted the time my system get more slow is whne I pone a bunch and bunch of progs and my ram get nears full and less than 74, mb availabe is whne the system tend to get more slow

Is here when the types comes I don't have enough experince with gnome on this one

But if you use kDE have some graph like taskmanger on Windows utulity called ksysguard su can use the terminal of kde called konsole others use xterm or otjher but that basically doesn't matter too type ypu root password and kill the nasty processes and as you on a XP taskmanager you can use the this kde kastmaneger even from fluxbox Icewm or any other window manager you could like without prob. But ksysguard as any graph prg is the system is too loaded can hogg and take time tto respond and is when the commad line relies useful for me since textmode wasted less resources than graph one

So if you wanna monitor from terminal and commanline

you type su (basically to any root operation the admistrator of a Unix like system is is basic for most things) you can type: top this command will tell how much ram is available and some processes running but have some disavangates only tell you the processes running from terminal and not the ones launched from other sources. but if good to know if you ram is near full. For a more list of detailed procss running on the background the ps command is more useful typing something like

ps -e will give all process running but the command to kill the is other maybe differen depending of the distro you use but generally killall some old Unix system it seems was only kill


for example if process like opera is hogging the system something

you make:
su
then your password to make any changes you want

then

top to see avilable memory then Contrl +c to quit top or oepning aonther konsole to use ps -e see all process

male for exmaple

kilall opera to kill the nasty process other otehr maybe running but all porgrams will could have an intuitive name like for exmaple if you wanna like the seamonkey browser

I guess you hva make

something like

kilall seamonley-bin you can just copy paste the process name without even type them different old DOS you had to write all

but also terminals lik konsole, xterm or any other had disvantages on a very hogged system this are not true terminal are emulation terminals make tu run in tex mode as the same timr run your graph mode is when the real terminal text mode has it uses

this can be accessed uslly tkeys in the distros are CTRTl * ALT! to enter rwal text mode or Control `ALT+ F7 to run graph mode. You also use C trol + f2 of f3 and that consecnute an you are opening different terminal sessions on the same running sytem without logout. This can be differens as I already mentioned from the distro is that way on Mandriva but same the same way on most i tried

so You do Ctrl + Alt +`f1 you go text mode will ask you username + password of you accoun even when you are logged on you graph one. but don confuse this with the root password the put root che mem usage with top cacel and the same way as do on emulation terminals

ps -e

and killall <process name>

this terminals have one advantage whne the system is really hogged and maintain runing even whne hd is loading and loading over the others running on graph mode but also have one disvanatge as anything on this liefe this a mmore reall command lime mdoe so you wo be to just copy/paste the process and have to be typed all completelylike you did on ados system and Unix like system are more specify in a sintax for if on dos window system you type prog fore exmaple notepad the system won't if it's on capitals or not if it'0s Notepad.exe instead notepad.exe here is different you to put the capitals and the rest the word as process name is

so if the process is

Seamonkey-bin you to put:

killall Seamonkey-bin

and NOT

killall seamonkey-bin

or or

killall SEAMONKEY-BIN

in some cases the sistems hogs so much that the nasty process could refuse to be killed is when I like the brute force to avoid rebooting

do the same process I previously mentioned if you haven't done

but this time a:

killall X (as mentioned put on capital not x )

This will killal graph mode and you'll be back on login screen without reboot the whole pc and you wcan login again. But be careful one thing you be on the login screen looks lik all was closed the hd stopped the insane loading but could some processes from thew previous sesion still hogging the sysme as if youi open thing again will hog some repeat the proocess of killing terminal chek any previous process this could more diffult to kill since the cpu usage less and avoid morr stupid loading and freezing and foget to chek the ram is less loaded again before opening more heavy task

I have been that way and has helped to reboot my old pc for weeks but as any thing I have need to doit but have helped
alot

Another method when the RAm get full as Window use thepage file to compnesate lack rram Linux have theirs but is made creating small swap partition on free space of the hd. But on I won't help on details since evry distro could different partition utilities most use gparted but for example MDV code it's own ones like diskdrake so on I won' give more details just mentioned as tip

JN4OldSchool
06-30-2008, 09:31 PM
Hello Acal,

Good writeup! But you do know you dont need to be root to run top or to kill a process? Just use the PID number with a kill statement:

$kill 3234