Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://hea-www.harvard.edu/~fine/Tech/vps.html
Дата изменения: Unknown Дата индексирования: Sun Apr 10 04:32:16 2016 Кодировка: Поисковые слова: п п п п п п п п п п п п п |
vps is a perl script which provides a terminal-based interactive view of all process, in a tree-structured format. That is, the processes are listed in parent-child order, with children indented below their parents. vps also provides for signalling selected process, and for displaying process environment variables, and open files.
The basic display is separated into a top area, where the process tree is displayed. and a bottom three lines, where additional details on the currently selected process is displayed.
The top area includes the tree structure, the process id, and the short name of the process without arguments. A full command and arguments (subject to fit within the window) can be displayed below by selecting a process. To the right of tree structure the following columns are displayed: the process owner (bold if changed), the start time, the memory usage, and the state.
The bottom area of the selected process shows on the first line the current processes' command and arguments. The next line shows the process I.D., the termainal, the user and group, the memory and resident memory. The third line shows the process start time, the elapsed time (not currently working under OS X), and the system time and percentage used.
The top region is scrollable if the entire process tree does not fit. The separator between the top and bottom sections works as a scrollbar, displaying what portion of the scrollable area is currently being viewed.
Key | Action |
---|---|
j | Move cursor down one line |
^N | Move cursor down one line |
k | Move cursor up one line |
^P | Move cursor up one line |
^F | Move cursor down one screen |
^B | Move cursor up one screen |
^E | Scroll screen upwards (cursor remains on same line if possible) |
^Y | Scroll screen downwards (cursor remains on same line if possible) |
^L | Redraw screen |
h | Help |
space | Rebuild list of processes and redisplay |
. | Update data displayed for current process |
e | Show environment variables for current process |
o | Show open files for current process (not on OS X) |
S | Send a signal to current process |
q | quit |
number | Enter a process ID, and press return to set current process (if it exists) |
/ | Enter a string to search forwards for, and press return. Searches program, arguments, user, and group |
? | Same as "/" but searches backwards. |
n | repeat last search |
- | use narrower indent in tree-structured display |
= | use wider indent in tree-structured display |
Many operations involve switching the top display to view some other information (environment variables, open files, help, or a list of signals). The top view is still controlled with the same characters. To return to the main view, press "q". In the Signal view, once you have selected the desired signal, press "S" to send that signal to the current process.
This program is almost exclusively used by the author on xterms. It is written to be terminal independent, but does have xterm-specific enhancements. Other terminals (or their termcap descriptions) may not provide adequate support to function properly.
Code modifications are possible, but the code is very crufty, having been drafted together from different pieces of old projects. Some of the terminal display functions seem to have support for HP, Dec, and other operating systems, but this is largely cruft, not actual support.
Fine's Home |
|
Send Me Email |