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

Содержание

Журнал

Пятница (03/11/11)

/dev/pts/10
14:14:45
#renice --19 -p 3969,3961,3498,3945
Usage:
 renice [-n] priority [-p|--pid] pid  [... pid]
 renice [-n] priority  -g|--pgrp pgrp [... pgrp]
 renice [-n] priority  -u|--user user [... user]
 renice -h | --help
 renice -v | --version
14:14:55
#renice --19 -p 3969 -p 3961 -p 3498 -p 3945
Usage:
 renice [-n] priority [-p|--pid] pid  [... pid]
 renice [-n] priority  -g|--pgrp pgrp [... pgrp]
 renice [-n] priority  -u|--user user [... user]
 renice -h | --help
 renice -v | --version
14:15:11
#ps aux|grep sleep
root      3498  0.0  0.0   4896   472 pts/11   T    14:50   0:00 sleep 3000
root      4267  0.0  0.0   4896   512 pts/5    S    15:30   0:00 sleep 3000
root      4275  0.0  0.0   4896   508 pts/5    S    15:30   0:00 sleep 30000
root      4284  0.0  0.1   5044   804 pts/11   S+   15:30   0:00 grep sleep
прошло 13 минут
/dev/pts/4
14:28:43
#jobs
[1]-  Running                 dd if=/dev/zero of=file1 bs=1024 count=230000000 &
[2]+  Running                 sleep 3000 &
14:28:45
#fg 1
dd if=/dev/zero of=file1 bs=1024 count=230000000
^C
^C^C
^C
^C
^C6279147+0 записей считано
6279147+0 записей написано
 скопировано 6429846528 байт (6,4 GB), 927,308 c, 6,9 MB/c
/dev/pts/12
14:28:56
#screen -x
/dev/pts/4
14:29:01
#rm file

14:29:06
#ls
12   Apt    folde1  folde3  hello-vi1.txt  hello-vi.txt!  link    sort_file
apt  file1  folde2  hard    hello-vi.txt   lilalo.tar.gz  script  wilen
14:29:14
#rm file1

14:29:43
#ls
12   folde1  hard           hello-vi.txt!  script
apt  folde2  hello-vi1.txt  lilalo.tar.gz  sort_file
Apt  folde3  hello-vi.txt   link           wilen
14:29:44
#jobs
[2]+  Running                 sleep 3000 &
14:29:47
#fg 2
sleep 3000
^C
14:29:51
#sleep 3000
^C
14:30:00
#sleep 3000 &
[1] 4267
14:30:01
#sleep 30000 &
[2] 4275
/dev/pts/10
14:30:23
#kill -9 3498
[2]+  Убито              sleep 3000
14:30:33
#ls
12   folde1  hard           hello-vi.txt!  script
apt  folde2  hello-vi1.txt  lilalo.tar.gz  sort_file
Apt  folde3  hello-vi.txt   link           wilen
14:30:36
#ps aux|grep sleep
root      4267  0.0  0.0   4896   512 pts/5    S    15:30   0:00 sleep 3000
root      4275  0.0  0.0   4896   508 pts/5    S    15:30   0:00 sleep 30000
root      4308  0.0  0.1   5044   804 pts/11   S+   15:30   0:00 grep sleep
14:30:39
#ps aux|grep sleep| egrep -v 'grep sleep'
root      4267  0.0  0.0   4896   512 pts/5    S    15:30   0:00 sleep 3000
root      4275  0.0  0.0   4896   508 pts/5    S    15:30   0:00 sleep 30000
14:31:18
#ps aux|grep sleep| egrep -v 'grep sleep'|egrep 'sleep 30000'
root      4275  0.0  0.0   4896   508 pts/5    S    15:30   0:00 sleep 30000
/dev/pts/12
14:33:22
#pwd
/root
/dev/pts/0
14:33:22
#apt-get install chkconfig
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Уже установлена самая новая версия chkconfig.
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
/dev/pts/7
14:33:22
#screen -x
/dev/pts/1
14:33:22
#logger "hello people"

/dev/pts/4
14:33:44
#screen -x
14:33:45
#screen -x
/dev/pts/10
14:34:16
#ps aux|grep sleep

14:34:16
#ps aux|grep sleep
                  ls /etc/init.d/
bootlogd          ifupdown               mtab.sh         single
bootlogs          ifupdown-clean         networking      skeleton
bootmisc.sh       kbd                    procps          ssh
checkfs.sh        keyboard-setup         rc              stop-bootlogd
checkroot.sh      killprocs              rc.local        stop-bootlogd-single
console-cyrillic  module-init-tools      rcS             sudo
console-setup     mountall-bootclean.sh  README          udev
cron              mountall.sh            reboot          udev-mtab
dbus              mountdevsubfs.sh       rmnologin       umountfs
halt              mountkernfs.sh         rsyslog         umountnfs.sh
hostname.sh       mountnfs-bootclean.sh  samba           umountroot
hwclockfirst.sh   mountnfs.sh            screen-cleanup  urandom
hwclock.sh        mountoverflowtmp       sendsigs        x11-common
прошло 24 минуты
/dev/pts/12
14:58:37
#ls
12  apt  Apt  folde1  folde2  folde3  hard  hello-vi1.txt  hello-vi.txt  hello-vi.txt!  lilalo.tar.gz  link  script  sort_file  wilen
/dev/pts/10
15:03:25
#ls /sbin/
agetty           getty              lsmod             route
badblocks        halt               mii-tool          rtacct
blkid            hwclock            mke2fs            rtmon
blockdev         ifconfig           mkfs              runlevel
bootlogd         ifdown             mkfs.bfs          sfdisk
cfdisk           ifup               mkfs.cramfs       shadowconfig
ctrlaltdel       init               mkfs.ext2         shutdown
debugfs          insmod             mkfs.ext3         slattach
depmod           insserv            mkfs.ext4         ss
dhclient         installkernel      mkfs.ext4dev      startpar
...
findfs           iptables-multi     pam_tally         telinit
fsck             iptables-restore   pam_tally2        tune2fs
fsck.cramfs      iptables-save      pivot_root        udevadm
fsck.ext2        iptunnel           plipconfig        udevd
fsck.ext3        isosize            poweroff          unix_chkpwd
fsck.ext4        kbdrate            rarp              unix_update
fsck.ext4dev     killall5           raw               wipefs
fsck.minix       ldconfig           reboot
fsck.nfs         logsave            resize2fs
fstab-decode     losetup            rmmod
15:04:08
#ls /sbin/ | grep *d

15:04:21
#ls /sbin/*d
/sbin/blkid     /sbin/depmod  /sbin/lsmod  /sbin/udevd
/sbin/bootlogd  /sbin/insmod  /sbin/rmmod  /sbin/unix_chkpwd
15:04:29
#ps ax |grep *d
 4671 pts/11   S+     0:00 grep hard
15:05:00
#ps ax |less
15:06:52
#/etc/init.d/samba stop
Stopping Samba daemons: nmbd smbd.
15:07:42
#ps aux|grep samba
root      4706  0.0  0.1   5044   804 pts/11   S+   16:07   0:00 grep samba
15:07:54
#/etc/init.d/samba start
Starting Samba daemons: nmbd smbd.
15:08:11
#ps aux|grep smbd
root      4727  0.1  0.4  19516  2832 ?        Ss   16:08   0:00 /usr/sbin/smbd -D
root      4740  0.0  0.2  19516  1192 ?        S    16:08   0:00 /usr/sbin/smbd -D
root      4751  0.0  0.1   5044   804 pts/11   S+   16:08   0:00 grep smbd
15:08:33
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
15:08:50
#/etc/init.d/samba
12             folde1/        hello-vi.txt!  .profile       .vimrc
apt/           folde2/        .l3rc          script         .w3m/
Apt            folde3/        .lesshst       sort_file      wilen
.bash_history  hard           .lilalo/       .ssh/
.bash_profile  hello-vi1.txt  lilalo.tar.gz  .vim/
.bashrc        hello-vi.txt   link           .viminfo
15:08:50
#/etc/init.d/samba
Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload|status}
15:09:06
#/etc/init.d/samba status
nmbd is running.
smbd is running.
15:09:38
#/etc/init.d/samba status
could not access PID file for nmbd ... failed!
could not access PID file for smbd ... failed!
15:09:41
#/etc/init.d/samba start
Starting Samba daemons: nmbd smbd.
15:09:48
#/etc/init.d/
bootlogd               killprocs              rsyslog
bootlogs               module-init-tools      samba
bootmisc.sh            mountall-bootclean.sh  screen-cleanup
checkfs.sh             mountall.sh            sendsigs
checkroot.sh           mountdevsubfs.sh       single
console-cyrillic       mountkernfs.sh         ssh
console-setup          mountnfs-bootclean.sh  stop-bootlogd
cron                   mountnfs.sh            stop-bootlogd-single
dbus                   mountoverflowtmp       sudo
halt                   mtab.sh                udev
hostname.sh            networking             udev-mtab
hwclockfirst.sh        procps                 umountfs
hwclock.sh             rc                     umountnfs.sh
ifupdown               rc.local               umountroot
ifupdown-clean         rcS                    urandom
kbd                    reboot                 x11-common
keyboard-setup         rmnologin
15:09:48
#/etc/init.d/reboot
12             folde1/        hello-vi.txt!  .profile       .vimrc
apt/           folde2/        .l3rc          script         .w3m/
Apt            folde3/        .lesshst       sort_file      wilen
.bash_history  hard           .lilalo/       .ssh/
.bash_profile  hello-vi1.txt  lilalo.tar.gz  .vim/
.bashrc        hello-vi.txt   link           .viminfo
15:09:48
#/etc/init.d/reboot
12             folde1/        hello-vi.txt!  .profile       .vimrc
apt/           folde2/        .l3rc          script         .w3m/
Apt            folde3/        .lesshst       sort_file      wilen
.bash_history  hard           .lilalo/       .ssh/
.bash_profile  hello-vi1.txt  lilalo.tar.gz  .vim/
.bashrc        hello-vi.txt   link           .viminfo
15:09:48
#/etc/init.d/
bootlogd               killprocs              rsyslog
bootlogs               module-init-tools      samba
bootmisc.sh            mountall-bootclean.sh  screen-cleanup
checkfs.sh             mountall.sh            sendsigs
checkroot.sh           mountdevsubfs.sh       single
console-cyrillic       mountkernfs.sh         ssh
console-setup          mountnfs-bootclean.sh  stop-bootlogd
cron                   mountnfs.sh            stop-bootlogd-single
dbus                   mountoverflowtmp       sudo
halt                   mtab.sh                udev
hostname.sh            networking             udev-mtab
hwclockfirst.sh        procps                 umountfs
hwclock.sh             rc                     umountnfs.sh
ifupdown               rc.local               umountroot
ifupdown-clean         rcS                    urandom
kbd                    reboot                 x11-common
keyboard-setup         rmnologin
15:09:48
#ls /etc/rc.d*
ls: невозможно получить доступ к /etc/rc.d*: Нет такого файла или каталога
15:16:17
#ls /etc/rc?.d
/etc/rc0.d:
K01samba    K02sendsigs  K04hwclock.sh    K05networking  K07umountfs    K09halt
K01urandom  K03rsyslog   K04umountnfs.sh  K06ifupdown    K08umountroot  README
/etc/rc1.d:
K01samba  K03rsyslog  README  S01bootlogs  S01killprocs  S02single
/etc/rc2.d:
README       S01rsyslog  S01sudo  S02dbus  S03rc.local   S03stop-bootlogd
S01bootlogs  S01samba    S02cron  S02ssh   S03rmnologin
/etc/rc3.d:
README       S01rsyslog  S01sudo  S02dbus  S03rc.local   S03stop-bootlogd
...
S01mountkernfs.sh    S08mtab.sh                S14mountnfs.sh
S02udev              S09checkfs.sh             S15mountnfs-bootclean.sh
S03mountdevsubfs.sh  S10ifupdown               S16kbd
S04bootlogd          S10mountall.sh            S17console-setup
S05keyboard-setup    S11mountall-bootclean.sh  S18bootmisc.sh
S06hostname.sh       S12mountoverflowtmp       S18console-cyrillic
S06hwclockfirst.sh   S13networking             S18screen-cleanup
S07checkroot.sh      S13procps                 S19stop-bootlogd-single
S08hwclock.sh        S13udev-mtab
S08ifupdown-clean    S13urandom
15:16:22