[Войти] [Зарегистрироваться]

Наши друзья и партнеры


Lines Club

Ищем достойных соперников.

Рекомендуем отличных дизайнеров! дизайнер интерьера квартир на сайте www.uni-dom.ru.

Книги по Linux (с отзывами читателей)

Библиотека сайта или "Мой Linux Documentation Project"

7.3. Monitoring Users

Just because you're paranoid doesn't mean they AREN'T out to get you... Source Unknown

From time to time there are going to be occasions where you will want to know exactly what people are doing on your system. Maybe you notice that a lot of RAM is being used, or a lot of CPU activity. You are going to want to see who is on the system, what they are running, and what kind of resources they are using.

7.3.1. The who command

The easiest way to see who is on the system is to do a who or w. The --> who is a simple tool that lists out who is logged --> on the system and what port or terminal they are logged on at.
user@server:~>  who
bjones   pts/0        May 23 09:33
wally    pts/3        May 20 11:35
aweeks   pts/1        May 22 11:03
aweeks   pts/2        May 23 15:04

7.3.2. The ps command -again!

In the previous section we can see that user aweeks is logged onto both pts/1 and pts/2, but what if we want to see what they are doing? We could to a ps -u aweeks and get the following output
user@server:~> ps -u aweeks
20876 pts/1    00:00:00 bash
20904 pts/2    00:00:00 bash
20951 pts/2    00:00:00 ssh
21012 pts/1    00:00:00 ps
From this we can see that the user is doing a ps ssh.

This is a much more consolidated use of the ps than discussed previously.

7.3.3. The w command

Even easier than using the who and ps -u commands is to use the w. w will print out not only who is on the system, but also the commands they are running.
user@server:~> w
aweeks   :0        09:32   ?xdm?  30:09   0.02s -:0
aweeks   pts/0     09:33    5:49m  0.00s  0.82s kdeinit: kded
aweeks   pts/2     09:35    8.00s  0.55s  0.36s vi sag-0.9.sgml
aweeks   pts/1     15:03   59.00s  0.03s  0.03s /bin/bash

From this we can see that I have a kde session running, I'm working in this document :-), and have another terminal open sitting idle at a bash prompt.

7.3.4. The skill command

To Be Added

7.3.5. nice and renice

To Be Added

Эта статья еще не оценивалась
Вы сможете оценить статью и оставить комментарий, если войдете или зарегистрируетесь.
Только зарегистрированные пользователи могут оценивать и комментировать статьи.

Комментарии отсутствуют