Translate this web page.

.
About me.


Contact me.


The SEO King
Free Web Directory - Add Your Link
The Little Web Directory
Begin Linux.
Doom WIKI.
slacklinux.darkbb.com/
xorl.wordpress.com/.
linuxaleph.blogspot.com/.
Doom64 for PC.
kernel.org/.
atomicmpc.com.au.
chrisbrogan.com.
Keep the Internet free.
Download: Fast, Fun, Awesome

Install Gnome 3 plugins.

Gnome 3 Live!

Linux user & Developer magazine.

Linux TV Wiki.

The Linux Documentation project.

The GNU Homepage.

Bloggers' Rights at EFF
Join the Blue Ribbon Online Free Speech Campaign

Join the Blue Ribbon Online Free Speech Campaign!

My old Doom Screenshots.

Doom Shots.

Some pictures related to 9/11.

September 11.

Slashdot.

Thinkgeek.

*|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|*

http://www.sitepromotiondirectory.com/computers_and_internet/search_engine_optimization/

My Linux PDF files. -- Old site content.

*|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|*

Useful Linux tips for using the ps command to list processes with the command line.

The ps command in Linux has many useful command-line parameters that may be used to give more information. The –forest parameter will give a tree view of the ps output that will show the children of each parent process. That is like the pstree command and will enable you to better visualise the relationships of all of the processes that are running on your UNIX or Linux desktop or server. Keeping track of all running processes on your system is important. Another useful command for Debian based Linux distributions is the apt command-line package management tool. Using the sudo apt-get update && sudo apt-get upgrade command will enable command-line installation of updates easily. You must install updates for your Linux system promptly; keeping your software up to date will patch security holes in your software and install new versions of installed packages. Unlike Windows; Linux is able to install updates whilst the computer is up and running; you only need to re-boot if your GNU Libc or Kernel is updated and then it is prudent to re-boot and load the new kernel version. But still better than Windows prompting you to restart every so often to update the software. That is aggravating.

Windows should be able to update software whilst it is running; it is the dominant desktop operating system in the world; why is it so incapable of something that Linux could do for ages? Microsoft are hyping Windows 8 as the next best thing but they need to improve the core workings of the Windows operating system and security. You should not need a virus scanner and Internet security software in 2012. But that is what happens when an operating system is the market leader; it is a huge target for malware authors and virus writers. Linux being an open-source operating system is naturally more secure than a closed source operating system solution. Below is the output of the pstree command that shows the running processes in a useful tree view. This is obviously useful when attempting to understand the relationships between running processes on your machine.

[ [email protected] ]
[ Jobs 0.PWD: ~.bash 4.2.20. ] [ 4 ]
[ 14:07:49 ]
[ $ ]-> pstree
init─┬─NetworkManager─┬─dhclient
     │                └─2*[{NetworkManager}]
     ├─accounts-daemon───{accounts-daemon}
     ├─atd
     ├─avahi-daemon───avahi-daemon
     ├─blueman-applet
     ├─console-kit-dae───64*[{console-kit-dae}]
     ├─cron
     ├─2*[dbus-daemon]
     ├─dbus-launch
     ├─gconfd-2
     ├─6*[getty]
     ├─gvfs-afc-volume───{gvfs-afc-volume}
     ├─gvfs-gdu-volume
     ├─gvfs-gphoto2-vo
     ├─gvfsd
     ├─gvfsd-dnssd
     ├─gvfsd-network───2*[{gvfsd-network}]
     ├─gvfsd-trash
     ├─leafpad
     ├─lightdm─┬─Xorg
     │         ├─sh─┬─ssh-agent
     │         │    ├─xfce4-session─┬─Thunar───2*[{Thunar}]
     │         │    │               ├─xfce4-panel─┬─firefox───22*[{firefox}]
     │         │    │               │             ├─panel-5-systray
     │         │    │               │             ├─xfce4-mixer-plu───{xfce4-mixer-plu}
     │         │    │               │             └─{xfce4-panel}
     │         │    │               ├─xfdesktop───{xfdesktop}
     │         │    │               ├─xfwm4
     │         │    │               └─{xfce4-session}
     │         │    └─xscreensaver
     │         └─2*[{lightdm}]
     ├─minissdpd
     ├─mintupdate-laun───sh───mintUpdate───{mintUpdate}
     ├─modem-manager
     ├─mount.ntfs
     ├─nm-applet───{nm-applet}
     ├─ntpd
     ├─obex-data-serve
     ├─pcscd───{pcscd}
     ├─polkit-gnome-au───{polkit-gnome-au}
     ├─polkitd───{polkitd}
     ├─portmap
     ├─rsyslogd───3*[{rsyslogd}]
     ├─system-config-p
     ├─udevd───2*[udevd]
     ├─udisks-daemon─┬─udisks-daemon
     │               └─2*[{udisks-daemon}]
     ├─upowerd───2*[{upowerd}]
     ├─wpa_supplicant
     ├─xfce4-power-man───{xfce4-power-man}
     ├─xfce4-settings-
     ├─xfce4-terminal─┬─bash───pstree
     │                ├─gnome-pty-helpe
     │                └─{xfce4-terminal}
     ├─xfce4-volumed───2*[{xfce4-volumed}]
     ├─xfconfd
     └─xfsettingsd

Use the -U parameter if you want to see Unicode characters used to draw the connections between the processes.

[flynn@flynn-grid-runner flynn]$ pstree -U
init─┬─NetworkManager─┬─dhclient
     │                ├─dnsmasq
     │                └─2*[{NetworkManager}]
     ├─SystemToolsBack
     ├─accounts-daemon───{accounts-daemon}
     ├─acpid
     ├─anacron───sh───run-parts───apt───sleep
     ├─atd
     ├─bluetoothd
     ├─chromium-browse─┬─chromium-browse
     │                 ├─chromium-browse───4*[{chromium-browse}]
     │                 └─22*[{chromium-browse}]
     ├─chromium-browse───chromium-browse─┬─7*[chromium-browse───3*[{chromium-browse}]]
     │                                   └─chromium-browse───4*[{chromium-browse}]
     ├─clock-applet───{clock-applet}
     ├─colord───2*[{colord}]
     ├─console-kit-dae───64*[{console-kit-dae}]
     ├─cron
     ├─cupsd
     ├─2*[dbus-daemon]
     ├─dbus-launch
     ├─gconfd-2
     ├─5*[getty]
     ├─gvfs-afc-volume───{gvfs-afc-volume}
     ├─gvfs-fuse-daemo───3*[{gvfs-fuse-daemo}]
     ├─gvfs-gdu-volume
     ├─gvfs-gphoto2-vo
     ├─gvfsd
     ├─gvfsd-metadata
     ├─gvfsd-trash
     ├─indicator-apple───{indicator-apple}
     ├─indicator-messa───{indicator-messa}
     ├─irqbalance
     ├─kdm─┬─Xorg
     │     └─kdm───mate-session─┬─applet.py
     │                          ├─caja───{caja}
     │                          ├─gpg-agent
     │                          ├─marco───{marco}
     │                          ├─mate-bluetooth-───2*[{mate-bluetooth-}]
     │                          ├─mate-panel───{mate-panel}
     │                          ├─mate-power-mana───{mate-power-mana}
     │                          ├─mate-volume-con
     │                          ├─mintupdate-laun───sh───mintUpdate───2*[{mintUpdate}]
     │                          ├─nm-applet───{nm-applet}
     │                          ├─polkit-mate-aut───{polkit-mate-aut}
     │                          ├─ssh-agent
     │                          ├─zeitgeist-datah───{zeitgeist-datah}
     │                          └─2*[{mate-session}]
     ├─login───bash
     ├─mate-keyring-da───4*[{mate-keyring-da}]
     ├─mate-screensave
     ├─mate-settings-d───{mate-settings-d}
     ├─mate-terminal─┬─bash───pstree
     │               ├─mate-terminal
     │               └─2*[{mate-terminal}]
     ├─matecomponent-a───2*[{matecomponent-a}]
     ├─mateconfd-2
     ├─mateweather-app───{mateweather-app}
     ├─me-tv─┬─me-tv-player───10*[{me-tv-player}]
     │       └─3*[{me-tv}]
     ├─modem-manager
     ├─2*[mount.ntfs]
     ├─multiload-apple───{multiload-apple}
     ├─mysqld───16*[{mysqld}]
     ├─nmbd
     ├─notification-ar───{notification-ar}
     ├─nscd───9*[{nscd}]
     ├─polkitd───{polkitd}
     ├─pulseaudio─┬─gconf-helper
     │            └─3*[{pulseaudio}]
     ├─rsyslogd───3*[{rsyslogd}]
     ├─rtkit-daemon───2*[{rtkit-daemon}]
     ├─smbd───smbd
     ├─system-tools-ba───{system-tools-ba}
     ├─timidity
     ├─ubuntuone-syncd───2*[{ubuntuone-syncd}]
     ├─udevd───2*[udevd]
     ├─udisks-daemon─┬─udisks-daemon
     │               └─2*[{udisks-daemon}]
     ├─upowerd───2*[{upowerd}]
     ├─upstart-socket-
     ├─upstart-udev-br
     ├─whoopsie───{whoopsie}
     ├─winbindd───winbindd
     ├─wnck-applet───{wnck-applet}
     ├─zeitgeist-daemo───{zeitgeist-daemo}
     ├─zeitgeist-fts─┬─cat
     │               └─{zeitgeist-fts}
     └─zfs-fuse───56*[{zfs-fuse}]

If you are reading this post on a Windows system; there is a nice manual page concerning the ps command here: http://unixhelp.ed.ac.uk/CGI/man-cgi?ps. The below output is from the ps a –forest command. This is a mode that uses ascii art to draw the child-parent relationships between processes.

[flynn@flynn-grid-runner flynn]$ ps a --forest
  PID TTY      STAT   TIME COMMAND
 3533 pts/0    Ss     0:00 bash
 3667 pts/0    R+     0:00  \_ ps a --forest
 1937 tty7     Ss+    0:41 /usr/bin/X :0 vt7 -br -nolisten tcp -auth /var/run/xauth/A:0-69qxFa
 2309 tty1     Ss+    0:00 /sbin/getty -8 38400 tty1
 1824 tty6     Ss+    0:00 /sbin/getty -8 38400 tty6
 1816 tty3     Ss+    0:00 /sbin/getty -8 38400 tty3
 1814 tty2     Ss     0:00 /bin/login --      
 3381 tty2     S+     0:00  \_ -bash
 1727 tty5     Ss+    0:00 /sbin/getty -8 38400 tty5
 1720 tty4     Ss+    0:00 /sbin/getty -8 38400 tty4

Another command for viewing a list of running processes is the psview commmand. Below is an example.

[flynn@flynn-grid-runner flynn]$ psview | grep bash
  │   └─bash,3381,flynn
  │   ├─bash,3533
  │   │   ├─grep,3963 --colour=auto bash

Leave a Reply