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

Содержание

Журнал

Пятница (03/31/17)

/dev/pts/2
10:26:02
#ps aux | grep signal_trep
root     22831  0.0  0.1   9968   876 pts/3    S+   11:26   0:00 grep signal_trep
10:26:03
#vim
10:26:16
#killall vim

10:26:26
#ps
  PID TTY          TIME CMD
22166 pts/3    00:00:00 l3script
22718 pts/3    00:00:00 sleep
22845 pts/3    00:00:00 vim
22863 pts/3    00:00:00 ps
10:26:27
#killall vim.orig
vim.orig: процесс не найден
10:26:38
#killall vi
vi: процесс не найден
10:26:41
#killall vim

10:26:44
#ps
  PID TTY          TIME CMD
22166 pts/3    00:00:00 l3script
22718 pts/3    00:00:00 sleep
22845 pts/3    00:00:00 vim
22895 pts/3    00:00:00 ps
10:26:45
#kill -9 22845
[1]+  Убито              /usr/bin/vim "$@"
10:27:06
#vim
10:27:15
#killall /usr/bin/vim

10:27:31
#ps
  PID TTY          TIME CMD
22166 pts/3    00:00:00 l3script
22718 pts/3    00:00:00 sleep
22916 pts/3    00:00:00 vim
22934 pts/3    00:00:00 ps
10:27:33
#killall vim

10:30:32
#ps
  PID TTY          TIME CMD
22166 pts/3    00:00:00 l3script
22718 pts/3    00:00:00 sleep
22916 pts/3    00:00:00 vim
22958 pts/3    00:00:00 ps
10:30:33
#killall -9 vim
[1]+  Убито              /usr/bin/vim "$@"
10:30:39
#nice -n 19 ~user/bi
bigfile  bin/
10:30:39
#nice -n 19 ~user/bin/bigwork
^C47248+0 записей считано
47248+0 записей написано
 скопировано 193527808 байт (194 MB), 5,34274 c, 36,2 MB/c
10:32:31
#nice -n 19 ~user/bin/bigwork &
[1] 22991
10:33:05
#nice
Display all 105 possibilities? (y or n)
10:33:40
#top
top - 11:33:56 up 6 days, 17:47,  2 users,  load average: 2,14, 0,62, 0,25
Tasks:  62 total,   1 running,  61 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0,0 us, 10,0 sy,  0,0 ni,  0,0 id, 90,0 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Mem:    507368 total,   501076 used,     6292 free,    94528 buffers
KiB Swap:        0 total,        0 used,        0 free,   337636 cached
  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
22999 root      39  19 11976  632  520 D   3,7  0,1   0:01.43 dd
  140 root      20   0     0    0    0 D   0,7  0,0   0:06.76 jbd2/xvda1-8
 3364 root      20   0     0    0    0 D   0,7  0,0   0:03.24 flush-202:0
   20 root      20   0     0    0    0 S   0,3  0,0   0:00.25 kswapd0
...
klmdfgoiot      20   0 71288 3608 2820 S   0,0  0,7   0:00.02 sshd
409600+0 записей считано S   0,0  0,3   0:00.12 sshd
409600+0 записей написано   0,0  0,6   0:00.31 bash
409600+0 записей считано S   0,0  0,2   0:00.01 getty
409600+0 записей написано   0,0  0,1   0:00.00 sleep
 скопировано 1677721600 байт (1,7 GB) скопировано 1677721600 байт (1,7 GB), 120,743 c, 13,9 MB/c
, 57,884 c, 29,0 MB/c9 12868 1184 1004 S   0,0  0,2   0:00.00 bigwork
23009 root      20   0 25284 1508 1128 R   0,0  0,3   0:00.29 top
[1]-  Done                    nice -n 19 ~user/bin/bigwork
[2]+  Done                    nice -n 20 ~user/bin/bigwork
10:35:07
#qqqdsgjndfg
l3script: qqqdsgjndfg: команда не найдена
10:35:07
#klmdfgoi
l3script: klmdfgoi: команда не найдена
10:35:07
#kill
kill      killall   killall5
10:35:07
#kill
kill      killall   killall5
10:35:07
#ps
  PID TTY          TIME CMD
22166 pts/3    00:00:00 l3script
22718 pts/3    00:00:00 sleep
23042 pts/3    00:00:00 ps
10:35:17
#killall b
bash     busybox
10:35:17
#killall
Использование: killall [ПАРАМЕТР]… [--] ИМЯ…
       killall -l, --list
       killall -V, --version
  -e,--exact           требовать полного совпадения для очень длинных имён
  -I,--ignore-case     игнорировать регистр символов в именах процессов
  -g,--process-group   завершать группу процесса вместо одного процесса
  -y,--younger-than    завершить процессы, новее чем заданного ВРЕМЕНИ
  -o,--older-than      завершить процессы, старее чем заданного ВРЕМЕНИ
  -i,--interactive     запрашивать подтверждение перед завершением процессов
  -l,--list            вывести список допустимых имён сигналов
  -q,--quiet           не показывать подробные сообщения
  -r,--regexp          рассматривать ИМЯ как расширенное регулярное выражение
TERM,--signal СИГНАÐ
  -u,--user ПОÐный только ПОÐ
rbose         уведомлять только при успешной отправке сигнала
  -V,--version         показать информацию о версии
  -w,--wait            ожидать завершения процессов
10:35:37
#^C

10:35:38
#vim &
10:38:18
#killall vim
[1]+  Stopped                 vim
10:38:24
#ssh 192.168.16.144
The authenticity of host '192.168.16.144 (192.168.16.144)' can't be established.
RSA key fingerprint is 6b:57:af:4b:43:9d:c0:dd:45:27:b7:41:93:dc:20:79.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.16.144' (RSA) to the list of known hosts.
root@192.168.16.144's password:
Last login: Fri Mar 31 00:21:58 2017
[root@CentOS2 ~]# ls -l /etc/rc3.d/
итого 0
lrwxrwxrwx. 1 root root 20 Мар 30 17:53 K01certmonger -> ../init.d/certmonger
lrwxrwxrwx. 1 root root 23 Мар 30 17:53 K01matahari-host -> ../init.d/matahari-host
...
[root@CentOS2 1132]# cat /var/log/ssh
Mar 31 01:59:20 CentOS2 root: Error
[root@CentOS2 1132]# cd
[root@CentOS2 ~]#
[root@CentOS2 ~]# exit
logout
Есть приостановленные задачи.
[root@CentOS2 ~]# exit
logout
Connection to 192.168.16.144 closed.
прошло >2 часов
13:34:18
#ssh 192.168.16.144
# File syncing capability is disabled by default. This feature is usually not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on
#### RULES ####
"/etc/rsyslog.conf" 80L, 2811C
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
...
ssh: нераспознанная служба
[root@CentOS2 ~]# service sshd reload
Reloading sshd:                                            [  OK  ]
[root@CentOS2 ~]# cat /var/log/ssh
Mar 31 01:59:20 CentOS2 root: Error
Mar 31 02:06:01 CentOS2 sshd[2409]: Server listening on 0.0.0.0 port 22.
Mar 31 02:06:01 CentOS2 sshd[2409]: Server listening on :: port 22.
[root@CentOS2 ~]# exit
logout
Connection to 192.168.16.144 closed.
13:38:25
#ssh 192.168.16.144
root@192.168.16.144's password:
Permission denied, please try again.
root@192.168.16.144's password:
13:38:34
#ssh 192.168.16.144
"/etc/rsyslog.conf" 80L, 2811C
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;local5.none;                /var/log/messages
# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure
# Log all the mail messages in one place.
...
uucp,news.crit                                          /var/log/spooler
# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log
"/etc/rsyslog.conf" 80L, 2811C written
[root@CentOS2 ~]# service rsyslog restart
Shutting down system logger:                               [  OK  ]
Starting system logger:                                    [  OK  ]
[root@CentOS2 ~]# exit
logout
Connection to 192.168.16.144 closed.
13:39:58
#ssh 192.168.16.144
#### RULES ####
"/etc/rsyslog.conf" 80L, 2811C
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;local5.none;                /var/log/messages
# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure
...
# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log
*.info;mail.none;authpriv.none;cron.none;local5.none                /var/log/messages
"/etc/rsyslog.conf" 80L, 2810C written
[root@CentOS2 ~]# service rsyslog restart
Shutting down system logger:                               [  OK  ]
Starting system logger:                                    [  OK  ]
[root@CentOS2 ~]# exit
logout
Connection to 192.168.16.144 closed.
13:41:00
#ssh 192.168.16.144
#### RULES ####
"/etc/rsyslog.conf" 80L, 2810C
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;local5.none                /var/log/messages
# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure
...
uucp,news.crit                                          /var/log/spooler
# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log
local5.*                                                @192.168.16.193
local5.                                                 @192.16
"/etc/rsyslog.conf" 80L, 2810C written
[root@CentOS2 ~]# exit
logout
Connection to 192.168.16.144 closed.
l
13:42:48
#ssh 192.168.16.144
root@192.168.16.144's password:
Permission denied, please try again.
root@192.168.16.144's password:
Last login: Fri Mar 31 02:08:58 2017 from 10.1.17.1
[root@CentOS2 ~]# exit
logout
Connection to 192.168.16.144 closed.
13:47:33
#ls /etc/log
logcheck/       login.defs      logrotate.conf  logrotate.d/
13:47:33
#ls /etc/logrotate.d/
apt  aptitude  dpkg  exim4-base  exim4-paniclog  iptraf  rsyslog
13:47:45
#apt
apt-cache                     apt-config                    apt-ftparchive                aptitude                      aptitude-curses               apt-key                       apt-sortpkgs
apt-cdrom                     apt-extracttemplates          apt-get                       aptitude-create-state-bundle  aptitude-run-state-bundle     apt-mark
13:47:45
#apt-
apt-cache             apt-cdrom             apt-config            apt-extracttemplates  apt-ftparchive        apt-get               apt-key               apt-mark              apt-sortpkgs
13:47:45