I'm teaching an introductory course on Linux, with an emphasis
on system administration.
We've been examining basic process management in class, the most
immediate application being killing a non-responding process (e.g.
netscape). So the steps are as follows:
1. Run netscape from /usr/local/netscape/netscape
2. Run ps aux | grep netscape
3. Identify the PID from the output and then kill the process.
However, I was puzzled when I tried this: netscape wasn't showing
up in response to
ps aux | grep netscape
So I just ran ps aux on its own, and I get
(process details) ......./usr/local/netsca
i.e. the command line name has been truncated, so grep is not picking
up netscape from the output of ps aux. Now, it will work if I tell
grep to look for netsca, i.e.
ps aux | grep netsca
but this isn't satisfactory when teaching beginners - "you can't enter
the whole name of the program, just the first part of it".
What if the command-line path was longer, and the executable was
omitted entirely from the output of ps aux? e.g.
The reason for this seems to be that the default terminal setting is
for 80 characters width; is it possible to increase this, or is there
a better way to approach this problem?
Running Mandrake 7.1 by the way.
Thanks in advance,
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!