Журнал лабораторных работ

Содержание

Журнал

Пятница (10/24/14)

/dev/pts/4
11:09:47
#ps -t tty1
  PID TTY          TIME CMD
 2320 tty1     00:00:00 getty
11:10:47
#ps -aux | grep -v USER.*PID.*%CPU | sort -n +3
sort: операция открытия завершилась неудачно: +3: Нет такого файла или каталога
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
11:11:50
#ps -aux | grep -v USER.*PID.*%CPU | sort -n +3
sort: операция открытия завершилась неудачно: +3: Нет такого файла или каталога
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
11:12:05
#man sort
11:12:23
#ps -aux | grep -v USER. *PID. *%CPU | sort -n +3
grep: sort: операция открытия завершилась неудачно: +3: Нет такого файла или каталога*PID.: Нет такого файла или каталога
grep: *%CPU: Нет такого файла или каталога
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
11:12:39
#ps -aux | grep -v USER.*PID.*%CPU | sort -n +13
sort: warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
операция открытия завершилась неудачно: +13: Нет такого файла или каталога
11:13:01
#ps -aux | grep -v USER.*PID.*%CPU | sort -n +1
sort: операция открытия завершилась неудачно: +1: Нет такого файла или каталога
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
11:13:03
#ps -aux | grep -v USER.*PID.*%CPU | sort -n 0
sort: операция открытия завершилась неудачно: 0: Нет такого файла или каталога
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
11:13:09
#ps aux | grep -v USER.*PID.*%CPU | sort -n 0
sort: операция открытия завершилась неудачно: 0: Нет такого файла или каталога
11:13:14
#ps aux | grep -v USER.*PID.*%CPU | sort -n
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
root         1  0.0  0.1  10648   836 ?        Ss   Окт17   0:09 init [2]
root     10519  0.0  0.2  24104  1312 pts/1    S+   Окт21   0:00 l3script
root     10527  0.0  0.5  33732  2980 pts/1    S+   Окт21   0:00 /usr/bin/vim 1.txt 2.txt
root       106  0.0  0.0      0     0 ?        S<   Окт17   0:00 [ata_sff]
root       107  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_0]
root       108  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_1]
root       109  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:1]
root        11  0.0  0.0      0     0 ?        S<   Окт17   0:00 [netns]
root        12  0.0  0.0      0     0 ?        S    Окт17   0:00 [xenwatch]
...
root         7  0.0  0.0      0     0 ?        S    Окт17   0:05 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
root         9  0.0  0.0      0     0 ?        S<   Окт17   0:00 [khelper]
root      9540  0.0  0.0  18168   472 ?        S    Окт21   0:00 script -f -c l3script -q /root/.lilalo//581150862636224613-1413874049.script
root      9541  0.0  0.5  24104  2616 pts/1    Ss   Окт21   0:00 l3script
student  24148  0.0  0.3  71292  1760 ?        SN   11:56   0:00 sshd: student@pts/6
student  24149  0.0  0.6  22596  3264 pts/6    SNs  11:56   0:00 -bash
student  24407  0.0  0.5  22188  2968 pts/6    SN+  12:05   0:00 bash
student  24490  0.0  0.5  33620  2624 pts/6    TN   12:06   0:00 vim 1.txt
101       2263  0.0  0.2  46808  1036 ?        Ss   Окт17   0:00 /usr/sbin/exim4 -bd -q30m
11:14:04
#ps -aux
warning: bad ps syntax, perhaps a bogus '-'?
See http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  10648   836 ?        Ss   Окт17   0:09 init [2]
root         2  0.0  0.0      0     0 ?        S    Окт17   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Окт17   0:03 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:0]
root         6  0.0  0.0      0     0 ?        S    Окт17   0:00 [migration/0]
root         7  0.0  0.0      0     0 ?        S    Окт17   0:05 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
...
root     22932  0.0  0.1  18164   844 pts/4    S+   09:31   0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-
root     22963  0.0  0.0  18168   472 pts/4    S+   09:31   0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-
root     22964  0.0  0.5  23928  2580 pts/5    Ss   09:31   0:00 l3script
root     23868  0.0  0.2  49932  1208 ?        Ss   11:09   0:00 /usr/sbin/sshd
root     24146  0.0  0.7  71292  3604 ?        SNs  11:56   0:00 sshd: student [priv]
student  24148  0.0  0.3  71292  1760 ?        SN   11:56   0:00 sshd: student@pts/6
student  24149  0.0  0.6  22596  3264 pts/6    SNs  11:56   0:00 -bash
student  24407  0.0  0.5  22188  2968 pts/6    SN+  12:05   0:00 bash
student  24490  0.0  0.5  33620  2624 pts/6    TN   12:06   0:00 vim 1.txt
root     24658  0.0  0.2  18948  1268 pts/5    R+   12:14   0:00 ps -aux
11:14:08
#ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  10648   836 ?        Ss   Окт17   0:09 init [2]
root         2  0.0  0.0      0     0 ?        S    Окт17   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Окт17   0:03 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:0]
root         6  0.0  0.0      0     0 ?        S    Окт17   0:00 [migration/0]
root         7  0.0  0.0      0     0 ?        S    Окт17   0:05 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
root         9  0.0  0.0      0     0 ?        S<   Окт17   0:00 [khelper]
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
...
root     22932  0.0  0.1  18164   844 pts/4    S+   09:31   0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-
root     22963  0.0  0.0  18168   472 pts/4    S+   09:31   0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-
root     22964  0.0  0.5  23928  2580 pts/5    Ss   09:31   0:00 l3script
root     23868  0.0  0.2  49932  1208 ?        Ss   11:09   0:00 /usr/sbin/sshd
root     24146  0.0  0.7  71292  3604 ?        SNs  11:56   0:00 sshd: student [priv]
student  24148  0.0  0.3  71292  1760 ?        SN   11:56   0:00 sshd: student@pts/6
student  24149  0.0  0.6  22596  3264 pts/6    SNs  11:56   0:00 -bash
student  24407  0.0  0.5  22188  2968 pts/6    SN+  12:05   0:00 bash
student  24490  0.0  0.5  33620  2624 pts/6    TN   12:06   0:00 vim 1.txt
root     24666  0.0  0.2  18948  1260 pts/5    R+   12:14   0:00 ps aux
11:14:13
#ps aux | grep -v USER.*PID.*%CPU | sort -n
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
root         1  0.0  0.1  10648   836 ?        Ss   Окт17   0:09 init [2]
root     10519  0.0  0.2  24104  1312 pts/1    S+   Окт21   0:00 l3script
root     10527  0.0  0.5  33732  2980 pts/1    S+   Окт21   0:00 /usr/bin/vim 1.txt 2.txt
root       106  0.0  0.0      0     0 ?        S<   Окт17   0:00 [ata_sff]
root       107  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_0]
root       108  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_1]
root       109  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:1]
root        11  0.0  0.0      0     0 ?        S<   Окт17   0:00 [netns]
root        12  0.0  0.0      0     0 ?        S    Окт17   0:00 [xenwatch]
...
root         7  0.0  0.0      0     0 ?        S    Окт17   0:05 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
root         9  0.0  0.0      0     0 ?        S<   Окт17   0:00 [khelper]
root      9540  0.0  0.0  18168   472 ?        S    Окт21   0:00 script -f -c l3script -q /root/.lilalo//581150862636224613-1413874049.script
root      9541  0.0  0.5  24104  2616 pts/1    Ss   Окт21   0:00 l3script
student  24148  0.0  0.3  71292  1760 ?        SN   11:56   0:00 sshd: student@pts/6
student  24149  0.0  0.6  22596  3264 pts/6    SNs  11:56   0:00 -bash
student  24407  0.0  0.5  22188  2968 pts/6    SN+  12:05   0:00 bash
student  24490  0.0  0.5  33620  2624 pts/6    TN   12:06   0:00 vim 1.txt
101       2263  0.0  0.2  46808  1036 ?        Ss   Окт17   0:00 /usr/sbin/exim4 -bd -q30m
11:14:36
#ps aux | grep -v USER.*PID.*%CPU | sort -n -k5 +5
sort: операция открытия завершилась неудачно: +5: Нет такого файла или каталога
11:15:24
#ps aux | grep -v USER.*PID.*%CPU | sort -n -k5 5
sort: операция открытия завершилась неудачно: 5: Нет такого файла или каталога
11:15:27
#ps aux | grep -v USER.*PID.*%CPU | sort -k5 -n 5
sort: операция открытия завершилась неудачно: 5: Нет такого файла или каталога
11:15:35
#ps aux | grep -v USER.*PID.*%CPU | sort -k 5 -n
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
root       106  0.0  0.0      0     0 ?        S<   Окт17   0:00 [ata_sff]
root       107  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_0]
root       108  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_1]
root       109  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:1]
root        11  0.0  0.0      0     0 ?        S<   Окт17   0:00 [netns]
root        12  0.0  0.0      0     0 ?        S    Окт17   0:00 [xenwatch]
root        13  0.0  0.0      0     0 ?        S    Окт17   0:00 [xenbus]
root        14  0.0  0.0      0     0 ?        S    Окт17   0:00 [sync_supers]
root       145  0.0  0.0      0     0 ?        S    Окт17   0:06 [jbd2/xvda1-8]
...
root      9541  0.0  0.5  24104  2616 pts/1    Ss   Окт21   0:00 l3script
student  24490  0.0  0.5  33620  2624 pts/6    TN   12:06   0:00 vim 1.txt
root     10527  0.0  0.5  33732  2980 pts/1    S+   Окт21   0:00 /usr/bin/vim 1.txt 2.txt
101       2263  0.0  0.2  46808  1036 ?        Ss   Окт17   0:00 /usr/sbin/exim4 -bd -q30m
root     23868  0.0  0.2  49932  1208 ?        Ss   11:09   0:00 /usr/sbin/sshd
root      1918  0.0  0.3  52772  1632 ?        Sl   Окт17   0:00 /usr/sbin/rsyslogd -c5
root     22885  0.0  0.7  71292  3768 ?        Ss   09:30   0:00 sshd: root@pts/4
root     24146  0.0  0.7  71292  3604 ?        SNs  11:56   0:00 sshd: student [priv]
student  24148  0.0  0.3  71292  1760 ?        SN   11:56   0:00 sshd: student@pts/6
root      3368  0.5  6.3  74680 32048 ?        Ss   Окт20  31:04 l3-agent
11:16:53
#ps aux | grep -v USER.*PID.*%CPU | sort -k4
root        21  0.0  0.0      0     0 ?        SN   Окт17   0:00 [ksmd]
root       106  0.0  0.0      0     0 ?        S<   Окт17   0:00 [ata_sff]
root        15  0.0  0.0      0     0 ?        S    Окт17   0:00 [bdi-default]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
root        23  0.0  0.0      0     0 ?        S<   Окт17   0:00 [crypto]
root       146  0.0  0.0      0     0 ?        S<   Окт17   0:00 [ext4-dio-unwrit]
root        22  0.0  0.0      0     0 ?        S    Окт17   0:00 [fsnotify_mark]
root        17  0.0  0.0      0     0 ?        S<   Окт17   0:00 [kblockd]
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
root         9  0.0  0.0      0     0 ?        S<   Окт17   0:00 [khelper]
...
root     22887  0.0  0.5  22180  2808 pts/4    Ss   09:31   0:00 -bash
student  24407  0.0  0.5  22188  2968 pts/6    SN+  12:05   0:00 bash
root     22964  0.0  0.5  23928  2580 pts/5    Ss   09:31   0:00 l3script
root      9541  0.0  0.5  24104  2616 pts/1    Ss   Окт21   0:00 l3script
student  24490  0.0  0.5  33620  2624 pts/6    TN   12:06   0:00 vim 1.txt
root     10527  0.0  0.5  33732  2980 pts/1    S+   Окт21   0:00 /usr/bin/vim 1.txt 2.txt
student  24149  0.0  0.6  22596  3264 pts/6    SNs  11:56   0:00 -bash
root     24146  0.0  0.7  71292  3604 ?        SNs  11:56   0:00 sshd: student [priv]
root     22885  0.0  0.7  71292  3768 ?        Ss   09:30   0:00 sshd: root@pts/4
root      3368  0.5  6.3  74680 32048 ?        Ss   Окт20  31:05 l3-agent
11:17:05
#ps aux | grep -v USER.*PID.*%CPU | sort -k4
root        21  0.0  0.0      0     0 ?        SN   Окт17   0:00 [ksmd]
root       106  0.0  0.0      0     0 ?        S<   Окт17   0:00 [ata_sff]
root        15  0.0  0.0      0     0 ?        S    Окт17   0:00 [bdi-default]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
root        23  0.0  0.0      0     0 ?        S<   Окт17   0:00 [crypto]
root       146  0.0  0.0      0     0 ?        S<   Окт17   0:00 [ext4-dio-unwrit]
root        22  0.0  0.0      0     0 ?        S    Окт17   0:00 [fsnotify_mark]
root        17  0.0  0.0      0     0 ?        S<   Окт17   0:00 [kblockd]
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
root         9  0.0  0.0      0     0 ?        S<   Окт17   0:00 [khelper]
...
root     22887  0.0  0.5  22180  2808 pts/4    Ss   09:31   0:00 -bash
student  24407  0.0  0.5  22188  2968 pts/6    SN+  12:05   0:00 bash
root     22964  0.0  0.5  23928  2580 pts/5    Ss   09:31   0:00 l3script
root      9541  0.0  0.5  24104  2616 pts/1    Ss   Окт21   0:00 l3script
student  24490  0.0  0.5  33620  2624 pts/6    TN   12:06   0:00 vim 1.txt
root     10527  0.0  0.5  33732  2980 pts/1    S+   Окт21   0:00 /usr/bin/vim 1.txt 2.txt
student  24149  0.0  0.6  22596  3264 pts/6    SNs  11:56   0:00 -bash
root     24146  0.0  0.7  71292  3604 ?        SNs  11:56   0:00 sshd: student [priv]
root     22885  0.0  0.7  71292  3768 ?        Ss   09:30   0:00 sshd: root@pts/4
root      3368  0.5  6.3  74680 32048 ?        Ss   Окт20  31:06 l3-agent
11:20:50
#echo $?
0
11:20:55
#locate sudoers
/usr/share/vim/vim73/ftplugin/sudoers.vim
/usr/share/vim/vim73/syntax/sudoers.vim
11:21:11
#ls -l /etc
итого 676
drwxr-xr-x 3 root root    4096 Окт 13 17:49 acpi
-rw-r--r-- 1 root root    2981 Июн 27 10:59 adduser.conf
-rw-r--r-- 1 root root      44 Окт 15 16:25 adjtime
-rw-r--r-- 1 root root     196 Июн 27 11:18 aliases
drwxr-xr-x 2 root root    4096 Окт 13 17:44 alternatives
drwxr-xr-x 6 root root    4096 Окт 13 17:45 apt
-rw-r--r-- 1 root root    1910 Окт 21 14:32 bash.bashrc
-rw-r--r-- 1 root root      45 Июн 17  2012 bash_completion
drwxr-xr-x 2 root root    4096 Июн 27 11:18 bash_completion.d
...
-rw-r--r-- 1 root root      12 Июн 27 11:57 timezone
-rw-r--r-- 1 root root    1552 Окт 19  2012 trafshow
-rw-r--r-- 1 root root    1260 Май 30  2008 ucf.conf
drwxr-xr-x 4 root root    4096 Июн 27 10:59 udev
drwxr-xr-x 3 root root    4096 Июн 27 11:52 ufw
drwxr-xr-x 2 root root    4096 Июн 27 10:59 vim
drwxr-xr-x 2 root root    4096 Июн 27 12:01 w3m
-rw-r--r-- 1 root root    4496 Фев  1  2014 wgetrc
drwxr-xr-x 3 root root    4096 Июн 27 11:00 X11
drwxr-xr-x 2 root root    4096 Июн 27 12:00 xml
11:21:51
#cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root    ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
11:22:55
#ps aux | grep -v RSS.*VSZ.*%CPU | sort -k2 -r
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      9541  0.0  0.5  24104  2616 pts/1    Ss   Окт21   0:00 l3script
root      9540  0.0  0.0  18168   472 ?        S    Окт21   0:00 script -f -c l3script -q /root/.lilalo//581150862636224613-1413874049.script
root         9  0.0  0.0      0     0 ?        S<   Окт17   0:00 [khelper]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
root         7  0.0  0.0      0     0 ?        S    Окт17   0:05 [watchdog/0]
root         6  0.0  0.0      0     0 ?        S    Окт17   0:00 [migration/0]
root      5366  0.0  0.0      0     0 ?        S    Окт20   0:11 [kworker/0:2]
root         5  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:0]
root       407  0.0  0.0      0     0 ?        S<   Окт17   0:00 [kpsmoused]
...
root        12  0.0  0.0      0     0 ?        S    Окт17   0:00 [xenwatch]
root        11  0.0  0.0      0     0 ?        S<   Окт17   0:00 [netns]
root       109  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:1]
root       108  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_1]
root       107  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_0]
root       106  0.0  0.0      0     0 ?        S<   Окт17   0:00 [ata_sff]
root     10527  0.0  0.5  33732  2980 pts/1    S+   Окт21   0:00 /usr/bin/vim 1.txt 2.txt
root     10519  0.0  0.2  24104  1312 pts/1    S+   Окт21   0:00 l3script
root         1  0.0  0.1  10648   836 ?        Ss   Окт17   0:09 init [2]
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
11:23:09
#ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  10648   836 ?        Ss   Окт17   0:09 init [2]
root         2  0.0  0.0      0     0 ?        S    Окт17   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Окт17   0:03 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:0]
root         6  0.0  0.0      0     0 ?        S    Окт17   0:00 [migration/0]
root         7  0.0  0.0      0     0 ?        S    Окт17   0:05 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
root         9  0.0  0.0      0     0 ?        S<   Окт17   0:00 [khelper]
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
...
root     22932  0.0  0.1  18164   844 pts/4    S+   09:31   0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-
root     22963  0.0  0.0  18168   472 pts/4    S+   09:31   0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-
root     22964  0.0  0.5  23928  2580 pts/5    Ss   09:31   0:00 l3script
root     23868  0.0  0.2  49932  1208 ?        Ss   11:09   0:00 /usr/sbin/sshd
root     24146  0.0  0.7  71292  3604 ?        SNs  11:56   0:00 sshd: student [priv]
student  24148  0.0  0.3  71292  1760 ?        SN   11:56   0:00 sshd: student@pts/6
student  24149  0.0  0.6  22596  3264 pts/6    SNs  11:56   0:00 -bash
student  24407  0.0  0.5  22188  2968 pts/6    SN+  12:05   0:00 bash
student  24490  0.0  0.5  33620  2624 pts/6    TN   12:06   0:00 vim 1.txt
root     24977  0.0  0.2  18948  1256 pts/5    R+   12:23   0:00 ps aux
11:23:30
#ps aux | grep -v RSS.*VSZ.*%CPU | sort -k2 -r
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      9541  0.0  0.5  24104  2616 pts/1    Ss   Окт21   0:00 l3script
root      9540  0.0  0.0  18168   472 ?        S    Окт21   0:00 script -f -c l3script -q /root/.lilalo//581150862636224613-1413874049.script
root         9  0.0  0.0      0     0 ?        S<   Окт17   0:00 [khelper]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
root         7  0.0  0.0      0     0 ?        S    Окт17   0:05 [watchdog/0]
root         6  0.0  0.0      0     0 ?        S    Окт17   0:00 [migration/0]
root      5366  0.0  0.0      0     0 ?        S    Окт20   0:11 [kworker/0:2]
root         5  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:0]
root       407  0.0  0.0      0     0 ?        S<   Окт17   0:00 [kpsmoused]
...
root        12  0.0  0.0      0     0 ?        S    Окт17   0:00 [xenwatch]
root        11  0.0  0.0      0     0 ?        S<   Окт17   0:00 [netns]
root       109  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:1]
root       108  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_1]
root       107  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_0]
root       106  0.0  0.0      0     0 ?        S<   Окт17   0:00 [ata_sff]
root     10527  0.0  0.5  33732  2980 pts/1    S+   Окт21   0:00 /usr/bin/vim 1.txt 2.txt
root     10519  0.0  0.2  24104  1312 pts/1    S+   Окт21   0:00 l3script
root         1  0.0  0.1  10648   836 ?        Ss   Окт17   0:09 init [2]
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
11:23:48
#ps aux | grep -v RSS.*VSZ.*%CPU | sort -r
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
student  24490  0.0  0.5  33620  2624 pts/6    TN   12:06   0:00 vim 1.txt
student  24407  0.0  0.5  22188  2968 pts/6    SN+  12:05   0:00 bash
student  24149  0.0  0.6  22596  3264 pts/6    SNs  11:56   0:00 -bash
student  24148  0.0  0.3  71292  1760 ?        SN   11:56   0:00 sshd: student@pts/6
root      9541  0.0  0.5  24104  2616 pts/1    Ss   Окт21   0:00 l3script
root      9540  0.0  0.0  18168   472 ?        S    Окт21   0:00 script -f -c l3script -q /root/.lilalo//581150862636224613-1413874049.script
root         9  0.0  0.0      0     0 ?        S<   Окт17   0:00 [khelper]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
root         7  0.0  0.0      0     0 ?        S    Окт17   0:05 [watchdog/0]
...
root        11  0.0  0.0      0     0 ?        S<   Окт17   0:00 [netns]
root       109  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:1]
root       108  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_1]
root       107  0.0  0.0      0     0 ?        S    Окт17   0:00 [scsi_eh_0]
root       106  0.0  0.0      0     0 ?        S<   Окт17   0:00 [ata_sff]
root     10527  0.0  0.5  33732  2980 pts/1    S+   Окт21   0:00 /usr/bin/vim 1.txt 2.txt
root     10519  0.0  0.2  24104  1312 pts/1    S+   Окт21   0:00 l3script
root         1  0.0  0.1  10648   836 ?        Ss   Окт17   0:09 init [2]
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
101       2263  0.0  0.2  46808  1036 ?        Ss   Окт17   0:00 /usr/sbin/exim4 -bd -q30m
11:24:39
#pstree
init─┬─acpid
     ├─cron
     ├─exim4
     ├─6*[getty]
     ├─l3-agent
     ├─rsyslogd───3*[{rsyslogd}]
     ├─script───l3script───l3script───vim
     ├─script───l3script───man───pager
     ├─sshd───bash───script───script───l3script───pstree
     ├─sshd───sshd───sshd───bash───bash───vim
     └─udevd
11:24:44
#pstree -p
init(1)─┬─acpid(1948)
        ├─cron(1990)
        ├─exim4(2263)
        ├─getty(2320)
        ├─getty(2321)
        ├─getty(2322)
        ├─getty(2323)
        ├─getty(2324)
        ├─getty(2325)
        ├─l3-agent(3368)
        ├─rsyslogd(1918)─┬─{rsyslogd}(1919)
        │                ├─{rsyslogd}(1921)
        │                └─{rsyslogd}(1922)
        ├─script(9540)───l3script(9541)───l3script(10519)───vim(10527)
        ├─script(18522)───l3script(18523)───man(19230)───pager(19239)
        ├─sshd(22885)───bash(22887)───script(22932)───script(22963)───l3script(22964)───pstree(25046)
        ├─sshd(23868)───sshd(24146)───sshd(24148)───bash(24149)───bash(24407)───vim(24490)
        └─udevd(289)
11:24:52
#ps lax
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
4     0     1     0  20   0  10648   836 -      Ss   ?          0:09 init [2]
1     0     2     0  20   0      0     0 -      S    ?          0:00 [kthreadd]
1     0     3     2  20   0      0     0 -      S    ?          0:03 [ksoftirqd/0]
1     0     5     2  20   0      0     0 -      S    ?          0:00 [kworker/u:0]
1     0     6     2 -100  -      0     0 -      S    ?          0:00 [migration/0]
5     0     7     2 -100  -      0     0 -      S    ?          0:05 [watchdog/0]
1     0     8     2   0 -20      0     0 -      S<   ?          0:00 [cpuset]
1     0     9     2   0 -20      0     0 -      S<   ?          0:00 [khelper]
5     0    10     2  20   0      0     0 -      S    ?          0:00 [kdevtmpfs]
...
0     0 22932 22887  20   0  18164   844 -      S+   pts/4      0:00 script -f -c l3script -q /root/.lilalo//1283021757248215
1     0 22963 22932  20   0  18168   472 -      S+   pts/4      0:00 script -f -c l3script -q /root/.lilalo//1283021757248215
4     0 22964 22963  20   0  23928  2580 -      Ss   pts/5      0:00 l3script
5     0 23868     1  20   0  49932  1208 -      Ss   ?          0:00 /usr/sbin/sshd
4     0 24146 23868  25   5  71292  3604 -      SNs  ?          0:00 sshd: student [priv]
5  1001 24148 24146  25   5  71292  1760 -      SN   ?          0:00 sshd: student@pts/6
0  1001 24149 24148  25   5  22596  3264 -      SNs  pts/6      0:00 -bash
0  1001 24407 24149  25   5  22188  2968 -      SN+  pts/6      0:00 bash
0  1001 24490 24407  25   5  33620  2624 -      TN   pts/6      0:00 vim 1.txt
4     0 25054 22964  20   0  10536   840 -      R+   pts/5      0:00 ps lax
11:25:08
#ps -U student
  PID TTY          TIME CMD
24148 ?        00:00:00 sshd
24149 pts/6    00:00:00 bash
24407 pts/6    00:00:00 bash
24490 pts/6    00:00:00 vim
11:25:24
#pstree
init─┬─acpid
     ├─cron
     ├─exim4
     ├─6*[getty]
     ├─l3-agent
     ├─rsyslogd───3*[{rsyslogd}]
     ├─script───l3script───l3script───vim
     ├─script───l3script───man───pager
     ├─sshd───bash───script───script───l3script───pstree
     ├─sshd───sshd───sshd───bash───bash───vim
     └─udevd
11:25:27
#pstree -p
init(1)─┬─acpid(1948)
        ├─cron(1990)
        ├─exim4(2263)
        ├─getty(2320)
        ├─getty(2321)
        ├─getty(2322)
        ├─getty(2323)
        ├─getty(2324)
        ├─getty(2325)
        ├─l3-agent(3368)
        ├─rsyslogd(1918)─┬─{rsyslogd}(1919)
        │                ├─{rsyslogd}(1921)
        │                └─{rsyslogd}(1922)
        ├─script(9540)───l3script(9541)───l3script(10519)───vim(10527)
        ├─script(18522)───l3script(18523)───man(19230)───pager(19239)
        ├─sshd(22885)───bash(22887)───script(22932)───script(22963)───l3script(22964)───pstree(25078)
        ├─sshd(23868)───sshd(24146)───sshd(24148)───bash(24149)───bash(24407)───vim(24490)
        └─udevd(289)
11:25:31
#ps lax -U student
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
4     0     1     0  20   0  10648   836 -      Ss   ?          0:09 init [2]
1     0     2     0  20   0      0     0 -      S    ?          0:00 [kthreadd]
1     0     3     2  20   0      0     0 -      S    ?          0:03 [ksoftirqd/0]
1     0     5     2  20   0      0     0 -      S    ?          0:00 [kworker/u:0]
1     0     6     2 -100  -      0     0 -      S    ?          0:00 [migration/0]
5     0     7     2 -100  -      0     0 -      S    ?          0:05 [watchdog/0]
1     0     8     2   0 -20      0     0 -      S<   ?          0:00 [cpuset]
1     0     9     2   0 -20      0     0 -      S<   ?          0:00 [khelper]
5     0    10     2  20   0      0     0 -      S    ?          0:00 [kdevtmpfs]
...
0     0 22932 22887  20   0  18164   844 -      S+   pts/4      0:00 script -f -c l3script -q /root/.lilalo//1283021757248215
1     0 22963 22932  20   0  18168   472 -      S+   pts/4      0:00 script -f -c l3script -q /root/.lilalo//1283021757248215
4     0 22964 22963  20   0  23928  2580 -      Ss   pts/5      0:00 l3script
5     0 23868     1  20   0  49932  1208 -      Ss   ?          0:00 /usr/sbin/sshd
4     0 24146 23868  25   5  71292  3604 -      SNs  ?          0:00 sshd: student [priv]
5  1001 24148 24146  25   5  71292  1760 -      SN   ?          0:00 sshd: student@pts/6
0  1001 24149 24148  25   5  22596  3264 -      SNs  pts/6      0:00 -bash
0  1001 24407 24149  25   5  22188  2968 -      SN+  pts/6      0:00 bash
0  1001 24490 24407  25   5  33620  2624 -      TN   pts/6      0:00 vim 1.txt
4     0 25086 22964  20   0  18948  1048 -      R+   pts/5      0:00 ps lax -U student
11:25:42
#ps lx -U student
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
4     0     1     0  20   0  10648   836 -      Ss   ?          0:09 init [2]
1     0     2     0  20   0      0     0 -      S    ?          0:00 [kthreadd]
1     0     3     2  20   0      0     0 -      S    ?          0:03 [ksoftirqd/0]
1     0     5     2  20   0      0     0 -      S    ?          0:00 [kworker/u:0]
1     0     6     2 -100  -      0     0 -      S    ?          0:00 [migration/0]
5     0     7     2 -100  -      0     0 -      S    ?          0:05 [watchdog/0]
1     0     8     2   0 -20      0     0 -      S<   ?          0:00 [cpuset]
1     0     9     2   0 -20      0     0 -      S<   ?          0:00 [khelper]
5     0    10     2  20   0      0     0 -      S    ?          0:00 [kdevtmpfs]
...
0     0 22932 22887  20   0  18164   844 -      S+   pts/4      0:00 script -f -c l3script -q /root/.lilalo//1283021757248215
1     0 22963 22932  20   0  18168   472 -      S+   pts/4      0:00 script -f -c l3script -q /root/.lilalo//1283021757248215
4     0 22964 22963  20   0  23928  2580 -      Ss   pts/5      0:00 l3script
5     0 23868     1  20   0  49932  1208 -      Ss   ?          0:00 /usr/sbin/sshd
4     0 24146 23868  25   5  71292  3604 -      SNs  ?          0:00 sshd: student [priv]
5  1001 24148 24146  25   5  71292  1760 -      SN   ?          0:00 sshd: student@pts/6
0  1001 24149 24148  25   5  22596  3264 -      SNs  pts/6      0:00 -bash
0  1001 24407 24149  25   5  22188  2968 -      SN+  pts/6      0:00 bash
0  1001 24490 24407  25   5  33620  2624 -      TN   pts/6      0:00 vim 1.txt
4     0 25094 22964  20   0  18948  1048 -      R+   pts/5      0:00 ps lx -U student
11:25:49
#ps aux -U student
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  10648   836 ?        Ss   Окт17   0:09 init [2]
root         2  0.0  0.0      0     0 ?        S    Окт17   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Окт17   0:03 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    Окт17   0:00 [kworker/u:0]
root         6  0.0  0.0      0     0 ?        S    Окт17   0:00 [migration/0]
root         7  0.0  0.0      0     0 ?        S    Окт17   0:05 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S<   Окт17   0:00 [cpuset]
root         9  0.0  0.0      0     0 ?        S<   Окт17   0:00 [khelper]
root        10  0.0  0.0      0     0 ?        S    Окт17   0:00 [kdevtmpfs]
...
root     22932  0.0  0.1  18164   844 pts/4    S+   09:31   0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-
root     22963  0.0  0.0  18168   472 pts/4    S+   09:31   0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-
root     22964  0.0  0.5  23928  2580 pts/5    Ss   09:31   0:00 l3script
root     23868  0.0  0.2  49932  1208 ?        Ss   11:09   0:00 /usr/sbin/sshd
root     24146  0.0  0.7  71292  3604 ?        SNs  11:56   0:00 sshd: student [priv]
student  24148  0.0  0.3  71292  1760 ?        SN   11:56   0:00 sshd: student@pts/6
student  24149  0.0  0.6  22596  3264 pts/6    SNs  11:56   0:00 -bash
student  24407  0.0  0.5  22188  2968 pts/6    SN+  12:05   0:00 bash
student  24490  0.0  0.5  33620  2624 pts/6    TN   12:06   0:00 vim 1.txt
root     25102  0.0  0.2  18948  1264 pts/5    R+   12:25   0:00 ps aux -U student
11:25:59
#ps ax -U student
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:09 init [2]
    2 ?        S      0:00 [kthreadd]
    3 ?        S      0:03 [ksoftirqd/0]
    5 ?        S      0:00 [kworker/u:0]
    6 ?        S      0:00 [migration/0]
    7 ?        S      0:05 [watchdog/0]
    8 ?        S<     0:00 [cpuset]
    9 ?        S<     0:00 [khelper]
   10 ?        S      0:00 [kdevtmpfs]
...
22932 pts/4    S+     0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-1414132290.script
22963 pts/4    S+     0:00 script -f -c l3script -q /root/.lilalo//1283021757248215014-1414132290.script
22964 pts/5    Ss     0:00 l3script
23868 ?        Ss     0:00 /usr/sbin/sshd
24146 ?        SNs    0:00 sshd: student [priv]
24148 ?        SN     0:00 sshd: student@pts/6
24149 pts/6    SNs    0:00 -bash
24407 pts/6    SN+    0:00 bash
24490 pts/6    TN     0:00 vim 1.txt
25110 pts/5    R+     0:00 ps ax -U student
11:26:07
#ps l -U student
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
5  1001 24148 24146  25   5  71292  1760 -      SN   ?          0:00 sshd: student@pts/6
0  1001 24149 24148  25   5  22596  3264 -      SNs  pts/6      0:00 -bash
0  1001 24407 24149  25   5  22188  2968 -      SN+  pts/6      0:00 bash
0  1001 24490 24407  25   5  33620  2624 -      TN   pts/6      0:00 vim 1.txt
11:26:16
#pstree -p
init(1)─┬─acpid(1948)
        ├─cron(1990)
        ├─exim4(2263)
        ├─getty(2320)
        ├─getty(2321)
        ├─getty(2322)
        ├─getty(2323)
        ├─getty(2324)
        ├─getty(2325)
        ├─l3-agent(3368)
        ├─rsyslogd(1918)─┬─{rsyslogd}(1919)
        │                ├─{rsyslogd}(1921)
        │                └─{rsyslogd}(1922)
        ├─script(9540)───l3script(9541)───l3script(10519)───vim(10527)
        ├─script(18522)───l3script(18523)───man(19230)───pager(19239)
        ├─sshd(22885)───bash(22887)───script(22932)───script(22963)───l3script(22964)───pstree(25126)
        ├─sshd(23868)───sshd(24146)───sshd(24148)───bash(24149)───bash(24407)───vim(24490)
        └─udevd(289)
11:26:21
#pstree -ph
init(1)─┬─acpid(1948)
        ├─cron(1990)
        ├─exim4(2263)
        ├─getty(2320)
        ├─getty(2321)
        ├─getty(2322)
        ├─getty(2323)
        ├─getty(2324)
        ├─getty(2325)
        ├─l3-agent(3368)
        ├─rsyslogd(1918)─┬─{rsyslogd}(1919)
        │                ├─{rsyslogd}(1921)
        │                └─{rsyslogd}(1922)
        ├─script(9540)───l3script(9541)───l3script(10519)───vim(10527)
        ├─script(18522)───l3script(18523)───man(19230)───pager(19239)
        ├─sshd(22885)───bash(22887)───script(22932)───script(22963)───l3script(22964)───pstree(25134)
        ├─sshd(23868)───sshd(24146)───sshd(24148)───bash(24149)───bash(24407)───vim(24490)
        └─udevd(289)
11:27:12
#pstree -hp
init(1)─┬─acpid(1948)
        ├─cron(1990)
        ├─exim4(2263)
        ├─getty(2320)
        ├─getty(2321)
        ├─getty(2322)
        ├─getty(2323)
        ├─getty(2324)
        ├─getty(2325)
        ├─l3-agent(3368)
        ├─rsyslogd(1918)─┬─{rsyslogd}(1919)
        │                ├─{rsyslogd}(1921)
        │                └─{rsyslogd}(1922)
        ├─script(9540)───l3script(9541)───l3script(10519)───vim(10527)
        ├─script(18522)───l3script(18523)───man(19230)───pager(19239)
        ├─sshd(22885)───bash(22887)───script(22932)───script(22963)───l3script(22964)───pstree(25142)
        ├─sshd(23868)───sshd(24146)───sshd(24148)───bash(24149)───bash(24407)───vim(24490)
        └─udevd(289)
11:27:23
#man pstree
11:28:04
#pstree -hsp
init(1)─┬─acpid(1948)
        ├─cron(1990)
        ├─exim4(2263)
        ├─getty(2320)
        ├─getty(2321)
        ├─getty(2322)
        ├─getty(2323)
        ├─getty(2324)
        ├─getty(2325)
        ├─l3-agent(3368)
        ├─rsyslogd(1918)─┬─{rsyslogd}(1919)
        │                ├─{rsyslogd}(1921)
        │                └─{rsyslogd}(1922)
        ├─script(9540)───l3script(9541)───l3script(10519)───vim(10527)
        ├─script(18522)───l3script(18523)───man(19230)───pager(19239)
        ├─sshd(22885)───bash(22887)───script(22932)───script(22963)───l3script(22964)───pstree(25173)
        ├─sshd(23868)───sshd(24146)───sshd(24148)───bash(24149)───bash(24407)───vim(24490)
        └─udevd(289)
11:28:09
#pstree -hs
init─┬─acpid
     ├─cron
     ├─exim4
     ├─6*[getty]
     ├─l3-agent
     ├─rsyslogd───3*[{rsyslogd}]
     ├─script───l3script───l3script───vim
     ├─script───l3script───man───pager
     ├─sshd───bash───script───script───l3script───pstree
     ├─sshd───sshd───sshd───bash───bash───vim
     └─udevd
11:28:12
#pstree -s
init─┬─acpid
     ├─cron
     ├─exim4
     ├─6*[getty]
     ├─l3-agent
     ├─rsyslogd───3*[{rsyslogd}]
     ├─script───l3script───l3script───vim
     ├─script───l3script───man───pager
     ├─sshd───bash───script───script───l3script───pstree
     ├─sshd───sshd───sshd───bash───bash───vim
     └─udevd
11:28:17
#pstree
init─┬─acpid
     ├─cron
     ├─exim4
     ├─6*[getty]
     ├─l3-agent
     ├─rsyslogd───3*[{rsyslogd}]
     ├─script───l3script───l3script───vim
     ├─script───l3script───man───pager
     ├─sshd───bash───script───script───l3script───pstree
     ├─sshd───sshd───sshd───bash───bash───vim
     └─udevd
11:28:35
#pstree -sp
init(1)─┬─acpid(1948)
        ├─cron(1990)
        ├─exim4(2263)
        ├─getty(2320)
        ├─getty(2321)
        ├─getty(2322)
        ├─getty(2323)
        ├─getty(2324)
        ├─getty(2325)
        ├─l3-agent(3368)
        ├─rsyslogd(1918)─┬─{rsyslogd}(1919)
        │                ├─{rsyslogd}(1921)
        │                └─{rsyslogd}(1922)
        ├─script(9540)───l3script(9541)───l3script(10519)───vim(10527)
        ├─script(18522)───l3script(18523)───man(19230)───pager(19239)
        ├─sshd(22885)───bash(22887)───script(22932)───script(22963)───l3script(22964)───pstree(25205)
        ├─sshd(23868)───sshd(24146)───sshd(24148)───bash(24149)───bash(24407)───vim(24490)
        └─udevd(289)
11:28:41
#ps lax
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
4     0     1     0  20   0  10648   836 -      Ss   ?          0:09 init [2]
1     0     2     0  20   0      0     0 -      S    ?          0:00 [kthreadd]
1     0     3     2  20   0      0     0 -      S    ?          0:03 [ksoftirqd/0]
1     0     5     2  20   0      0     0 -      S    ?          0:00 [kworker/u:0]
1     0     6     2 -100  -      0     0 -      S    ?          0:00 [migration/0]
5     0     7     2 -100  -      0     0 -      S    ?          0:05 [watchdog/0]
1     0     8     2   0 -20      0     0 -      S<   ?          0:00 [cpuset]
1     0     9     2   0 -20      0     0 -      S<   ?          0:00 [khelper]
5     0    10     2  20   0      0     0 -      S    ?          0:00 [kdevtmpfs]
...
0     0 22932 22887  20   0  18164   844 -      S+   pts/4      0:00 script -f -c l3script -q /root/.lilalo//1283021757248215
1     0 22963 22932  20   0  18168   472 -      S+   pts/4      0:00 script -f -c l3script -q /root/.lilalo//1283021757248215
4     0 22964 22963  20   0  23928  2580 -      Ss   pts/5      0:00 l3script
5     0 23868     1  20   0  49932  1208 -      Ss   ?          0:00 /usr/sbin/sshd
4     0 24146 23868  25   5  71292  3604 -      SNs  ?          0:00 sshd: student [priv]
5  1001 24148 24146  25   5  71292  1760 -      SN   ?          0:00 sshd: student@pts/6
0  1001 24149 24148  25   5  22596  3264 -      SNs  pts/6      0:00 -bash
0  1001 24407 24149  25   5  22188  2968 -      SN+  pts/6      0:00 bash
0  1001 24490 24407  25   5  33620  2624 -      TN   pts/6      0:00 vim 1.txt
4     0 25213 22964  20   0  10536   836 -      R+   pts/5      0:00 ps lax
11:29:20
#top
top - 12:32:56 up 6 days, 17:49,  2 users,  load average: 0,00, 0,01, 0,05
Tasks:  63 total,   1 running,  61 sleeping,   1 stopped,   0 zombie
%Cpu(s):  0,3 us,  0,3 sy,  0,0 ni, 99,3 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Mem:    507368 total,   406056 used,   101312 free,   142276 buffers
KiB Swap:        0 total,        0 used,        0 free,   143436 cached
  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
    1 root      20   0 10648  836  696 S   0,0  0,2   0:09.49 init
    2 root      20   0     0    0    0 S   0,0  0,0   0:00.00 kthreadd
    3 root      20   0     0    0    0 S   0,0  0,0   0:03.99 ksoftirqd/0
    5 root      20   0     0    0    0 S   0,0  0,0   0:00.00 kworker/u:0
...
  108     2     0 root     root     ?          0:00.04   0,0  0,0 S scsi_eh_1
  109     2     0 root     root     ?          0:00.00   0,0  0,0 S kworker/u:1
  145     2     0 root     root     ?          0:06.71   0,0  0,0 S jbd2/xvda1-8
  146     2     0 root     root     ?          0:00.00   0,0  0,0 S ext4-dio-unwrit
  289     1     0 root     root     ?          0:00.04   0,0  0,2 S udevd
  407     2     0 root     root     ?          0:00.00   0,0  0,0 S kpsmoused
 1918     1     0 root     root     ?          0:00.08   0,0  0,3 S rsyslogd
 1948     1     0 root     root     ?          0:00.00   0,0  0,1 S acpid
 1990     1     0 root     root     ?          0:00.80   0,0  0,2 S cron
top - 13:58:05 up 6 days, 19:14,  2 users,  load average: 0,93, 0,91, 0,88
прошло 88 минут
12:58:05
#~/bin/bigwork
l3script: /root/bin/bigwork: Нет такого файла или каталога
12:58:15
#uptime
 14:01:26 up 6 days, 19:18,  2 users,  load average: 0,12, 0,61, 0,77
13:01:26
#man uptime
13:01:59
#man uptime
13:05:03
#ls /etc/init.d/
acpid                   console-setup  keyboard-setup         mountkernfs.sh         rc         screen-cleanup  udev-mtab
bootlogs                cron           killprocs              mountnfs-bootclean.sh  rc.local   sendsigs        umountfs
bootmisc.sh             exim4          kmod                   mountnfs.sh            rcS        single          umountnfs.sh
checkfs.sh              halt           motd                   mtab.sh                README     skeleton        umountroot
checkroot-bootclean.sh  hostname.sh    mountall-bootclean.sh  netdiag                reboot     ssh             urandom
checkroot.sh            hwclock.sh     mountall.sh            networking             rmnologin  sudo
console-cyrillic        kbd            mountdevsubfs.sh       procps                 rsyslog    udev
13:10:49
#ps lax | grep ssh
4     0 22885     1  20   0  71292  3768 -      Ss   ?          0:06 sshd: root@pts/4
5     0 23868     1  20   0  49932  1208 -      Ss   ?          0:00 /usr/sbin/sshd
4     0 24146 23868  25   5  71292  3616 -      SNs  ?          0:00 sshd: student [priv]
5  1001 24148 24146  25   5  71292  1868 -      SN   ?          0:00 sshd: student@pts/6
0     0 25311 22964  20   0   9968   872 -      S+   pts/5      0:00 grep ssh
13:11:49
#man service
13:13:45
#apt-get install vsftpd
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
НОВЫЕ пакеты, которые будут установлены:
  vsftpd
обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
Необходимо скачать 158 kБ архивов.
После данной операции, объём занятого дискового пространства возрастёт на 286 kB.
Получено:1 http://ftp.ua.debian.org/debian/ wheezy/main vsftpd amd64 2.3.5-3 [158 kB]
Получено 158 kБ за 0с (1 317 kБ/c)
Предварительная настройка пакетов ...
Выбор ранее не выбранного пакета vsftpd.
(Чтение базы данных … на данный момент установлено 28947 файлов и каталогов.)
Распаковывается пакет vsftpd (из файла …/vsftpd_2.3.5-3_amd64.deb) …
Обрабатываются триггеры для man-db …
Настраивается пакет vsftpd (2.3.5-3) …
Starting FTP server: vsftpd.
13:16:01
#dpkg -L vsftpd |less
13:19:11
#No next tag (press RETURN)
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      25537/vsftpd
13:19:22
#service vsftpd start
Starting FTP server: /usr/sbin/vsftpd already running.
vsftpd.
13:22:50
#apt-get install telnetd
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Будут установлены следующие дополнительные пакеты:
  libfile-copy-recursive-perl openbsd-inetd update-inetd
НОВЫЕ пакеты, которые будут установлены:
  libfile-copy-recursive-perl openbsd-inetd telnetd update-inetd
обновлено 0, установлено 4 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
Необходимо скачать 125 kБ архивов.
После данной операции, объём занятого дискового пространства возрастёт на 417 kB.
...
Выбор ранее не выбранного пакета telnetd.
Распаковывается пакет telnetd (из файла …/telnetd_0.17-36_amd64.deb) …
Обрабатываются триггеры для man-db …
Настраивается пакет libfile-copy-recursive-perl (0.38-1) …
Настраивается пакет update-inetd (4.43) …
Настраивается пакет openbsd-inetd (0.20091229-2) …
[ ok ] Stopping internet superserver: inetd.
[info] Not starting internet superserver: no services enabled.
Настраивается пакет telnetd (0.17-36) …
Добавление пользователя telnetd в группу utmp
13:24:45
#echo $$
22964
13:24:55
#echo $?
0
13:25:02
#ps lax
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
4     0     1     0  20   0  10648   836 -      Ss   ?          0:09 init [2]
1     0     2     0  20   0      0     0 -      S    ?          0:00 [kthreadd]
1     0     3     2  20   0      0     0 -      S    ?          0:04 [ksoftirqd/0]
1     0     5     2  20   0      0     0 -      S    ?          0:00 [kworker/u:0]
1     0     6     2 -100  -      0     0 -      S    ?          0:00 [migration/0]
5     0     7     2 -100  -      0     0 -      S    ?          0:05 [watchdog/0]
1     0     8     2   0 -20      0     0 -      S<   ?          0:00 [cpuset]
1     0     9     2   0 -20      0     0 -      S<   ?          0:00 [khelper]
5     0    10     2  20   0      0     0 -      S    ?          0:00 [kdevtmpfs]
...
4     0 24146 23868  25   5  71292  3616 -      SNs  ?          0:00 sshd: student [priv]
5  1001 24148 24146  25   5  71292  1868 -      SN   ?          0:00 sshd: student@pts/6
0  1001 24149 24148  25   5  22596  3264 -      SNs  pts/6      0:00 -bash
0  1001 24407 24149  25   5  22188  2968 -      SN+  pts/6      0:00 bash
0  1001 24490 24407  25   5  33620  2624 -      TN   pts/6      0:00 vim 1.txt
1     0 25222     2  20   0      0     0 -      S    ?          0:02 [kworker/0:0]
1     0 25225     2  20   0      0     0 -      S    ?          0:00 [kworker/0:2]
4     0 25537     1  20   0  25408  1444 -      S    ?          0:00 /usr/sbin/vsftpd
5     0 27034     1  20   0  10440   708 -      Ss   ?          0:00 /usr/sbin/inetd
4     0 27059 22964  20   0  10536   844 -      R+   pts/5      0:00 ps lax
13:27:34
#netstat -tanp | grep 23
tcp        0      0 192.168.13.4:22         0.0.0.0:*               LISTEN      23868/sshd
tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN      27034/inetd
13:27:52
#netstat tanp | grep 23

13:28:02
#netstat -tanp | grep 23
tcp        0      0 192.168.13.4:22         0.0.0.0:*               LISTEN      23868/sshd
tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN      27034/inetd
13:28:06
#ps lax
F   UID   PID  PPID PRI  NI    VSZ   RSS WCHAN  STAT TTY        TIME COMMAND
4     0     1     0  20   0  10648   836 -      Ss   ?          0:09 init [2]
1     0     2     0  20   0      0     0 -      S    ?          0:00 [kthreadd]
1     0     3     2  20   0      0     0 -      S    ?          0:04 [ksoftirqd/0]
1     0     5     2  20   0      0     0 -      S    ?          0:00 [kworker/u:0]
1     0     6     2 -100  -      0     0 -      S    ?          0:00 [migration/0]
5     0     7     2 -100  -      0     0 -      S    ?          0:05 [watchdog/0]
1     0     8     2   0 -20      0     0 -      S<   ?          0:00 [cpuset]
1     0     9     2   0 -20      0     0 -      S<   ?          0:00 [khelper]
5     0    10     2  20   0      0     0 -      S    ?          0:00 [kdevtmpfs]
...
4     0 24146 23868  25   5  71292  3616 -      SNs  ?          0:00 sshd: student [priv]
5  1001 24148 24146  25   5  71292  1868 -      SN   ?          0:00 sshd: student@pts/6
0  1001 24149 24148  25   5  22596  3264 -      SNs  pts/6      0:00 -bash
0  1001 24407 24149  25   5  22188  2968 -      SN+  pts/6      0:00 bash
0  1001 24490 24407  25   5  33620  2624 -      TN   pts/6      0:00 vim 1.txt
1     0 25222     2  20   0      0     0 -      S    ?          0:02 [kworker/0:0]
1     0 25225     2  20   0      0     0 -      S    ?          0:00 [kworker/0:2]
4     0 25537     1  20   0  25408  1444 -      S    ?          0:00 /usr/sbin/vsftpd
5     0 27034     1  20   0  10440   708 -      Ss   ?          0:00 /usr/sbin/inetd
4     0 27103 22964  20   0  10536   836 -      R+   pts/5      0:00 ps lax
13:30:48
#service telnetd start
telnetd: unrecognized service
13:32:23
#service telnet start
telnet: unrecognized service
13:32:33
#apt-get install telnetd
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Уже установлена самая новая версия telnetd.
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
13:32:46
#netstat -tanp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      25537/vsftpd
tcp        0      0 192.168.13.4:22         0.0.0.0:*               LISTEN      23868/sshd
tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN      27034/inetd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2263/exim4
tcp        0      0 192.168.13.4:54876      46.4.144.245:18030      TIME_WAIT   -
tcp        0    464 192.168.13.4:22         192.168.15.102:53169    ESTABLISHED 22885/4
tcp        0      0 192.168.13.4:54874      46.4.144.245:18030      TIME_WAIT   -
tcp        0      0 192.168.13.4:54875      46.4.144.245:18030      TIME_WAIT   -
tcp        0      0 192.168.13.4:22         192.168.15.102:56502    ESTABLISHED 24146/sshd: student
tcp6       0      0 ::1:25                  :::*                    LISTEN      2263/exim4
прошло 74 минуты
/dev/pts/8
14:47:05
#apt-get install sysv-rc-conf
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Уже установлена самая новая версия sysv-rc-conf.
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
14:52:37
#service rsyslog restart
[ ok ] Stopping enhanced syslogd: rsyslogd.
[ ok ] Starting enhanced syslogd: rsyslogd.
14:52:54
#cd /var/log

14:53:18
#ls
alternatives.log    auth.log.3.gz    debug.1     dmesg.4.gz  kern.log       mail.log       syslog       user.log
alternatives.log.1  btmp             debug.2.gz  dpkg.log    kern.log.1     mail.warn      syslog.1     user.log.1
apt                 btmp.1           debug.3.gz  dpkg.log.1  kern.log.2.gz  messages       syslog.2.gz  user.log.2.gz
aptitude            daemon.log       dmesg       exim4       kern.log.3.gz  messages.1     syslog.3.gz  user.log.3.gz
aptitude.1.gz       daemon.log.1     dmesg.0     faillog     lastlog        messages.2.gz  syslog.4.gz  vsftpd.log
auth.log            daemon.log.2.gz  dmesg.1.gz  fsck        lpr.log        messages.3.gz  syslog.5.gz  wtmp
auth.log.1          daemon.log.3.gz  dmesg.2.gz  installer   mail.err       news           syslog.6.gz  wtmp.1
auth.log.2.gz       debug            dmesg.3.gz  iptraf      mail.info      ssh.log        syslog.7.gz
14:53:21
#cat ssh.log

14:53:31
#logger -p local5.info "Test message"

14:54:15
#echo $$
28664
14:54:18
#cat ssh.log
Oct 24 15:54:15 debian4 logger: Test message
14:54:27
#logger --help
Usage:
 logger [options] [message]
Options:
 -d, --udp             use UDP (TCP is default)
 -i, --id              log the process ID too
 -f, --file <file>     log the contents of this file
 -h, --help            display this help text and exit
 -n, --server <name>   write to this remote syslog server
 -P, --port <number>   use this UDP port
 -p, --priority <prio> mark given message with this priority
 -s, --stderr          output message to standard error as well
 -t, --tag <tag>       mark every line with this tag
 -u, --socket <socket> write to this Unix socket
 -V, --version         output version information and exit
14:56:25
#~
acpi                    deluser.conf            init.d           magic.mime      profile.d       shadow-
adduser.conf            dhcp                    initramfs-tools  mailcap         protocols       shells
adjtime                 discover.conf.d         inittab          mailcap.order   python          skel
aliases                 discover-modprobe.conf  inputrc          mailname        python2.7       ssh
alternatives            dpkg                    insserv          manpath.config  rc0.d           ssl
apt                     email-addresses         insserv.conf     mime.types      rc1.d           staff-group-for-usr-local
bash.bashrc             environment             insserv.conf.d   mke2fs.conf     rc2.d           sudoers
bash_completion         exim4                   iproute2         modprobe.d      rc3.d           sudoers.d
bash_completion.d       file                    issue            modules         rc4.d           sysctl.conf
bindresvport.blacklist  fstab                   issue.net        motd            rc5.d           sysctl.d
...
console-setup           grub.d                  lilalo           nsswitch.conf   rpc             ufw
cron.d                  gshadow                 locale.alias     opt             rsyslog.conf    vim
cron.daily              gshadow-                locale.gen       os-release      rsyslog.d       vsftpd.conf
cron.hourly             host.conf               localtime        pam.conf        screenrc        w3m
cron.monthly            hostname                logcheck         pam.d           securetty       wgetrc
crontab                 hosts                   login.defs       passwd          security        X11
cron.weekly             hosts.allow             logrotate.conf   passwd-         selinux         xml
debconf.conf            hosts.deny              logrotate.d      perl            services
debian_version          inetd.conf              lynx-cur         ppp             sgml
default                 init                    magic            profile         shadow
14:56:44
#vi /etc/ssh
--- /tmp/l3-saved-28664.6518.8783	2014-10-24 15:57:34.313049919 +0300
+++ /etc/ssh/sshd_config	2014-10-24 15:58:14.685058982 +0300
@@ -19,7 +19,7 @@
 ServerKeyBits 768
 
 # Logging
-SyslogFacility AUTH
+SyslogFacility LOCAL5 
 LogLevel INFO
 
 # Authentication:
@@ -41,6 +41,7 @@
 #IgnoreUserKnownHosts yes
 
 # To enable empty passwords, change to yes (NOT RECOMMENDED)
+
 PermitEmptyPasswords no
 
 # Change to yes to enable challenge-response passwords (beware issues with
14:57:19
#~
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
ListenAddress 192.168.13.4
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
...
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
"/etc/ssh/sshd_config" 88L, 2497C записано
-- ВСТАВКА --ou will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
14:58:14
#netstat -tanp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      25537/vsftpd
tcp        0      0 192.168.13.4:22         0.0.0.0:*               LISTEN      23868/sshd
tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN      27034/inetd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2263/exim4
tcp        0      0 192.168.13.4:54889      46.4.144.245:18030      TIME_WAIT   -
tcp        0      0 192.168.13.4:22         192.168.15.102:53169    ESTABLISHED 22885/4
tcp        0    464 192.168.13.4:22         192.168.15.102:55634    ESTABLISHED 28580/8
tcp        0      0 192.168.13.4:22         192.168.15.102:56502    ESTABLISHED 24146/sshd: student
tcp6       0      0 ::1:25                  :::*                    LISTEN      2263/exim4
14:58:26
#kill -1 23868

15:00:08
#echo $?
0
15:00:13
#netstat -tanp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      25537/vsftpd
tcp        0      0 192.168.13.4:22         0.0.0.0:*               LISTEN      28897/sshd
tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN      27034/inetd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2263/exim4
tcp        0      0 192.168.13.4:54891      46.4.144.245:18030      TIME_WAIT   -
tcp        0      0 192.168.13.4:22         192.168.15.102:53169    ESTABLISHED 22885/4
tcp        0    464 192.168.13.4:22         192.168.15.102:55634    ESTABLISHED 28580/8
tcp        0      0 192.168.13.4:22         192.168.15.102:56502    ESTABLISHED 24146/sshd: student
tcp6       0      0 ::1:25                  :::*                    LISTEN      2263/exim4
15:01:04
#cat /var/log/ssh.log
Oct 24 15:54:15 debian4 logger: Test message
Oct 24 16:00:08 debian4 sshd[28897]: Server listening on 192.168.13.4 port 22.
15:01:17
#tail /var/log/syslog
Oct 24 10:17:01 debian4 /USR/SBIN/CRON[23364]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct 24 11:17:01 debian4 /USR/SBIN/CRON[23933]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct 24 12:17:01 debian4 /USR/SBIN/CRON[24735]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct 24 13:17:01 debian4 /USR/SBIN/CRON[25229]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct 24 14:17:01 debian4 /USR/SBIN/CRON[25549]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct 24 15:17:01 debian4 /USR/SBIN/CRON[27206]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct 24 15:52:54 debian4 kernel: imklog 5.8.11, log source = /proc/kmsg started.
Oct 24 15:52:54 debian4 rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="28755" x-info="http://www.rsyslog.com"] start
Oct 24 15:54:15 debian4 logger: Test message
Oct 24 16:00:08 debian4 sshd[28897]: Server listening on 192.168.13.4 port 22.
15:01:57
#vi /etc/rsyslog.conf
--- /tmp/l3-saved-28664.9445.25474	2014-10-24 16:02:28.809046334 +0300
+++ /etc/rsyslog.conf	2014-10-24 16:04:42.069055936 +0300
@@ -59,7 +59,7 @@
 # First some standard log files.  Log by facility.
 #
 auth,authpriv.*			/var/log/auth.log
-*.*;auth,authpriv.none		-/var/log/syslog
+*.*;auth,authpriv.none,local5.none		-/var/log/syslog
 #cron.*				/var/log/cron.log
 daemon.*			-/var/log/daemon.log
 kern.*				-/var/log/kern.log
15:04:42
#ls -lh /var/log/syslog*
-rw-r----- 1 root adm 1,5K Окт 24 16:00 /var/log/syslog
-rw-r----- 1 root adm 2,8K Окт 24 06:25 /var/log/syslog.1
-rw-r----- 1 root adm  436 Окт 23 06:25 /var/log/syslog.2.gz
-rw-r----- 1 root adm  436 Окт 22 06:25 /var/log/syslog.3.gz
-rw-r----- 1 root adm  432 Окт 21 06:25 /var/log/syslog.4.gz
-rw-r----- 1 root adm  452 Окт 20 06:25 /var/log/syslog.5.gz
-rw-r----- 1 root adm  423 Окт 19 06:25 /var/log/syslog.6.gz
-rw-r----- 1 root adm  17K Окт 18 06:25 /var/log/syslog.7.gz
15:05:50
#cat /etc/sshd_config
cat: /etc/sshd_config: Нет такого файла или каталога
15:06:14
#ls /etc
acpi                    deluser.conf            init.d           magic.mime      profile.d       shadow-
adduser.conf            dhcp                    initramfs-tools  mailcap         protocols       shells
adjtime                 discover.conf.d         inittab          mailcap.order   python          skel
aliases                 discover-modprobe.conf  inputrc          mailname        python2.7       ssh
alternatives            dpkg                    insserv          manpath.config  rc0.d           ssl
apt                     email-addresses         insserv.conf     mime.types      rc1.d           staff-group-for-usr-local
bash.bashrc             environment             insserv.conf.d   mke2fs.conf     rc2.d           sudoers
bash_completion         exim4                   iproute2         modprobe.d      rc3.d           sudoers.d
bash_completion.d       file                    issue            modules         rc4.d           sysctl.conf
bindresvport.blacklist  fstab                   issue.net        motd            rc5.d           sysctl.d
...
console-setup           grub.d                  lilalo           nsswitch.conf   rpc             ufw
cron.d                  gshadow                 locale.alias     opt             rsyslog.conf    vim
cron.daily              gshadow-                locale.gen       os-release      rsyslog.d       vsftpd.conf
cron.hourly             host.conf               localtime        pam.conf        screenrc        w3m
cron.monthly            hostname                logcheck         pam.d           securetty       wgetrc
crontab                 hosts                   login.defs       passwd          security        X11
cron.weekly             hosts.allow             logrotate.conf   passwd-         selinux         xml
debconf.conf            hosts.deny              logrotate.d      perl            services
debian_version          inetd.conf              lynx-cur         ppp             sgml
default                 init                    magic            profile         shadow
15:06:24
#cat /etc/sshd_conf
cat: /etc/sshd_conf: Нет такого файла или каталога
15:08:38
#cat /etc/ssh/sshd_config
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
ListenAddress 192.168.13.4
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
...
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
15:08:44
#cat /etc/ssh/shsd_config
cat: /etc/ssh/shsd_config: Нет такого файла или каталога
15:08:57
#cat /etc/ssh/sshd_config
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
ListenAddress 192.168.13.4
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
...
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
15:09:01
#vi /etc/log
15:09:01
#vi /etc/logrotate.d
15:10:36
#~
/var/log/syslog
{
        rotate 7
        daily
        missingok
        notifempty
        delaycompress
        compress
        postrotate
                invoke-rc.d rsyslog rotate > /dev/null
...
        weekly
        missingok
        notifempty
        compress
        delaycompress
        sharedscripts
        postrotate
                invoke-rc.d rsyslog rotate > /dev/null
        endscript
}

Файлы

  • /etc/ssh/sshd_config
  • /etc/sshd_conf
  • /etc/sudoers
  • /var/log/ssh.log
  • ssh.log
  • /etc/ssh/sshd_config
    >
    # Package generated configuration file
    # See the sshd_config(5) manpage for details
    # What ports, IPs and protocols we listen for
    Port 22
    # Use these options to restrict which interfaces/protocols sshd will bind to
    #ListenAddress ::
    ListenAddress 192.168.13.4
    Protocol 2
    # HostKeys for protocol version 2
    HostKey /etc/ssh/ssh_host_rsa_key
    HostKey /etc/ssh/ssh_host_dsa_key
    HostKey /etc/ssh/ssh_host_ecdsa_key
    #Privilege Separation is turned on for security
    UsePrivilegeSeparation yes
    # Lifetime and size of ephemeral version 1 server key
    KeyRegenerationInterval 3600
    ServerKeyBits 768
    # Logging
    SyslogFacility LOCAL5
    LogLevel INFO
    # Authentication:
    LoginGraceTime 120
    PermitRootLogin yes
    StrictModes yes
    RSAAuthentication yes
    PubkeyAuthentication yes
    #AuthorizedKeysFile     %h/.ssh/authorized_keys
    # Don't read the user's ~/.rhosts and ~/.shosts files
    IgnoreRhosts yes
    # For this to work you will also need host keys in /etc/ssh_known_hosts
    RhostsRSAAuthentication no
    # similar for protocol version 2
    HostbasedAuthentication no
    # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
    #IgnoreUserKnownHosts yes
    # To enable empty passwords, change to yes (NOT RECOMMENDED)
    PermitEmptyPasswords no
    # Change to yes to enable challenge-response passwords (beware issues with
    # some PAM modules and threads)
    ChallengeResponseAuthentication no
    # Change to no to disable tunnelled clear text passwords
    #PasswordAuthentication yes
    # Kerberos options
    #KerberosAuthentication no
    #KerberosGetAFSToken no
    #KerberosOrLocalPasswd yes
    #KerberosTicketCleanup yes
    # GSSAPI options
    #GSSAPIAuthentication no
    #GSSAPICleanupCredentials yes
    X11Forwarding yes
    X11DisplayOffset 10
    PrintMotd no
    PrintLastLog yes
    TCPKeepAlive yes
    #UseLogin no
    #MaxStartups 10:30:60
    #Banner /etc/issue.net
    # Allow client to pass locale environment variables
    AcceptEnv LANG LC_*
    Subsystem sftp /usr/lib/openssh/sftp-server
    # Set this to 'yes' to enable PAM authentication, account processing,
    # and session processing. If this is enabled, PAM authentication will
    # be allowed through the ChallengeResponseAuthentication and
    # PasswordAuthentication.  Depending on your PAM configuration,
    # PAM authentication via ChallengeResponseAuthentication may bypass
    # the setting of "PermitRootLogin without-password".
    # If you just want the PAM account and session checks to run without
    # PAM authentication, then enable this but set PasswordAuthentication
    # and ChallengeResponseAuthentication to 'no'.
    UsePAM yes
    
    /etc/sshd_conf
    >
    cat: /etc/sshd_conf: Нет такого файла или каталога
    
    /etc/sudoers
    >
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # Please consider adding local content in /etc/sudoers.d/ instead of
    # directly modifying this file.
    #
    # See the man page for details on how to write a sudoers file.
    #
    Defaults        env_reset
    Defaults        mail_badpass
    Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    # Host alias specification
    # User alias specification
    # Cmnd alias specification
    # User privilege specification
    root    ALL=(ALL:ALL) ALL
    # Allow members of group sudo to execute any command
    %sudo   ALL=(ALL:ALL) ALL
    # See sudoers(5) for more information on "#include" directives:
    #includedir /etc/sudoers.d
    
    /var/log/ssh.log
    >
    Oct 24 15:54:15 debian4 logger: Test message
    Oct 24 16:00:08 debian4 sshd[28897]: Server listening on 192.168.13.4 port 22.
    
    ssh.log
    >
    Oct 24 15:54:15 debian4 logger: Test message
    

    Статистика

    Время первой команды журнала11:09:47 2014-10-24
    Время последней команды журнала15:10:36 2014-10-24
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %14.85
    Процент синтаксически неверно набранных команд, % 0.99
    Суммарное время работы с терминалом *, час 1.30
    Количество командных строк в единицу времени, команда/мин 1.30
    Частота использования команд
    ps33|=======================| 23.24%
    grep22|===============| 15.49%
    sort18|============| 12.68%
    pstree12|========| 8.45%
    cat9|======| 6.34%
    netstat6|====| 4.23%
    man5|===| 3.52%
    echo5|===| 3.52%
    ls5|===| 3.52%
    service4|==| 2.82%
    vi4|==| 2.82%
    apt-get4|==| 2.82%
    ~3|==| 2.11%
    logger2|=| 1.41%
    dpkg1|| 0.70%
    top1|| 0.70%
    cd1|| 0.70%
    bigwork1|| 0.70%
    locate1|| 0.70%
    tail1|| 0.70%
    uptime1|| 0.70%
    less1|| 0.70%
    No1|| 0.70%
    kill1|| 0.70%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ find / -name abc
      find: /home/devi-orig/.gnome2: Keine Berechtigung
      find: /home/devi-orig/.gnome2_private: Keine Berechtigung
      find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung
      find: /home/devi-orig/.metacity: Keine Berechtigung
      find: /home/devi-orig/.inkscape: Keine Berechtigung
      ^C
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$