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

Содержание

Журнал

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

/dev/ttyp8
13:32:04
#[root@fbsd5:src]#

13:32:05
#[root@fbsd5:src]#

13:32:05
#[root@fbsd5:src]#

13:32:05
#[root@fbsd5:src]#

13:32:05
#[root@fbsd5:src]#

13:32:05
#[root@fbsd5:src]#

13:32:06
#[root@fbsd5:src]#

13:32:06
#[root@fbsd5:src]#

13:32:06
#[root@fbsd5:src]#

13:32:06
#[root@fbsd5:src]#

13:32:07
#[root@fbsd5:src]#

13:32:14
#[user@fbsd5:~]$
[root@fbsd5:src]# exit
exit
13:32:15
#[user@fbsd5:~]$

13:32:15
#[user@fbsd5:~]$ exit
exit
Connection to 192.168.16.25 closed.
/dev/ttypb
13:32:52
$screen -x
прошло 15 минут
/dev/ttyp8
13:48:29
#[user@fbsd5:~]$ su -
[user@debian1:~]$ ssh 192.168.16.25
Password:
Last login: Fri Sep 11 12:32:48 2009 from 192.168.16.1
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
...
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
l3-agent is already running: pid=57820; pidfile=/home/user/.lilalo/l3-agent.pid
Password:
l3-agent is already running: pid=33829; pidfile=/root/.lilalo/l3-agent.pid
13:49:13
#[root@fbsd5:ports]# make search name=cowsay
[root@fbsd5:~]# cd /usr/ports/
Port:   cowsay-3.03_1
Path:   /usr/ports/games/cowsay
Info:   Configurable talking characters in ASCII art
Maint:  kris@FreeBSD.org
B-deps: perl-5.8.8_1
R-deps: perl-5.8.8_1
WWW:    http://www.nog.net/~tony/warez/cowsay.shtml
13:49:37
#[root@fbsd5:ports]#
[root@fbsd5:ports]#
13:49:37
#[root@fbsd5:ports]#

13:49:44
#[root@fbsd5:ports]# cd games/cowsay/
[root@fbsd5:ports]# make search key=cowsay
Port:   cowsay-3.03_1
Path:   /usr/ports/games/cowsay
Info:   Configurable talking characters in ASCII art
Maint:  kris@FreeBSD.org
B-deps: perl-5.8.8_1
R-deps: perl-5.8.8_1
WWW:    http://www.nog.net/~tony/warez/cowsay.shtml
Port:   insub-10.1
Path:   /usr/ports/irc/insub
Info:   Some scripts for expressing how you feel on irc and the web
Maint:  alfred@FreeBSD.org
B-deps: cowsay-3.03_1 perl-5.8.8_1
R-deps: figlet-2.2.1 p5-Term-ANSIColor-1.11 perl-5.8.8_1
WWW:
13:50:17
#[root@fbsd5:ports]# pwd
/usr/ports
13:50:36
#[root@fbsd5:cowsay]# make install
[root@fbsd5:ports]# cd games/cowsay/
===>  Vulnerability check disabled, database not found
=> cowsay-3.03.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from ftp://ftp.nog.net/pub/tony/cowsay/.
fetch: ftp://ftp.nog.net/pub/tony/cowsay/cowsay-3.03.tar.gz: Connection refused
=> Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/.
cowsay-3.03.tar.gz                            100% of   14 kB   25 kBps
===>  Extracting for cowsay-3.03_1
=> MD5 Checksum OK for cowsay-3.03.tar.gz.
=> SHA256 Checksum OK for cowsay-3.03.tar.gz.
...
x cows/tux.cow
x cows/udder.cow
x cows/vader-koala.cow
x cows/www.cow
x cows/vader.cow
+ set +x
Okay, let us see if the install actually worked.
Installation complete! Enjoy the cows!
===>   Compressing manual pages for cowsay-3.03_1
===>   Registering installation for cowsay-3.03_1
13:51:43
#[root@fbsd5:cowsay]# LANG=C
[root@fbsd5:cowsay]# cowsay HELOO\
>
 _______
< HELOO >
 -------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × /var/mail/root
13:51:51
#[root@fbsd5:cowsay]# cowsay HELOO\
> cowsay HELOO\
>
 ___________________
< HELOOcowsay HELOO >
 -------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
13:51:57
#[root@fbsd5:cowsay]# pkg_info -l
[root@fbsd5:cowsay]# cowsay HELO
 ______
< HELO >
 ------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
pkg_info: option requires an argument -- l
usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]
                [-t template] -a | pkg-name ...
       pkg_info [-qQ] -W filename
       pkg_info [-qQ] -O origin
       pkg_info
13:52:38
#[root@fbsd5:cowsay]# pkg_info -i
pkg_info: missing package name(s)
usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]
                [-t template] -a | pkg-name ...
       pkg_info [-qQ] -W filename
       pkg_info [-qQ] -O origin
       pkg_info
13:52:45
#[root@fbsd5:cowsay]# pkg_info -Ix *
[root@fbsd5:cowsay]# pkg_info -Ix
pkg_info: missing package name(s)
usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]
                [-t template] -a | pkg-name ...
       pkg_info [-qQ] -W filename
       pkg_info [-qQ] -O origin
       pkg_info
xorg-cf-files-1.0.2_2 X.org cf files for use with imake builds
13:52:48
#[root@fbsd5:cowsay]# pkg_info -i
pkg_info: missing package name(s)
usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]
                [-t template] -a | pkg-name ...
       pkg_info [-qQ] -W filename
       pkg_info [-qQ] -O origin
       pkg_info
13:53:02
#[root@fbsd5:cowsay]# pkg_info -L
[root@fbsd5:cowsay]# pkg_info -Lx
pkg_info: missing package name(s)
usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]
                [-t template] -a | pkg-name ...
       pkg_info [-qQ] -W filename
       pkg_info [-qQ] -O origin
       pkg_info
pkg_info: missing package name(s)
usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]
                [-t template] -a | pkg-name ...
       pkg_info [-qQ] -W filename
       pkg_info [-qQ] -O origin
       pkg_info
13:53:05
#[root@fbsd5:cowsay]# man pkg_info
[root@fbsd5:cowsay]# pkg_info -l
pkg_info: option requires an argument -- l
usage: pkg_info [-bcdDEfgGiIjkKLmopPqQrRsvVxX] [-e package] [-l prefix]
                [-t template] -a | pkg-name ...
       pkg_info [-qQ] -W filename
       pkg_info [-qQ] -O origin
       pkg_info
PKG_INFO(1)             FreeBSD General Commands Manual            PKG_INFO(1)
NAME
     pkg_info -- a utility for displaying information on software packages
...
             version numbers can also be matched in a relational manner using
             the >=, <=, > and < operators.  For example, pkg_info
             'portupgrade>=20030723' will match versions 20030723 and later of
             the portupgrade package.
     -a      Show all currently installed packages.
     -b      Use the BLOCKSIZE environment variable for output even when the
             -q or -Q flag is present.
     -v      Turn on verbose output.
     -p      Show the installation prefix for each package.
     -q      Be ``quiet'' in emitting report headers and such, just dump the
13:53:18
#[root@fbsd5:cowsay]# pkg_info -a | less
13:53:38
#[root@fbsd5:cowsay]# pkg_info -Lx cowsay
[root@fbsd5:cowsay]# pkg_info -L cowsay
pkg_info: can't find package 'cowsay' installed or in a file!
Information for cowsay-3.03_1:
Files:
/usr/local/man/man1/cowsay.1.gz
/usr/local/man/man1/cowthink.1.gz
/usr/local/bin/cowsay
/usr/local/bin/cowthink
/usr/local/share/cows/beavis.zen.cow
/usr/local/share/cows/bong.cow
...
/usr/local/share/cows/telebears.cow
/usr/local/share/cows/three-eyes.cow
/usr/local/share/cows/turkey.cow
/usr/local/share/cows/turtle.cow
/usr/local/share/cows/tux.cow
/usr/local/share/cows/tux-stab.cow
/usr/local/share/cows/udder.cow
/usr/local/share/cows/vader-koala.cow
/usr/local/share/cows/vader.cow
/usr/local/share/cows/www.cow
13:53:46
#[root@fbsd5:cowsay]# pkg_info -L cowsay
pkg_info: can't find package 'cowsay' installed or in a file!
13:53:48
#[root@fbsd5:cowsay]# pkg_info -Lx cowsay
Information for cowsay-3.03_1:
Files:
/usr/local/man/man1/cowsay.1.gz
/usr/local/man/man1/cowthink.1.gz
/usr/local/bin/cowsay
/usr/local/bin/cowthink
/usr/local/share/cows/beavis.zen.cow
/usr/local/share/cows/bong.cow
/usr/local/share/cows/box.cow
/usr/local/share/cows/bud-frogs.cow
...
/usr/local/share/cows/telebears.cow
/usr/local/share/cows/three-eyes.cow
/usr/local/share/cows/turkey.cow
/usr/local/share/cows/turtle.cow
/usr/local/share/cows/tux.cow
/usr/local/share/cows/tux-stab.cow
/usr/local/share/cows/udder.cow
/usr/local/share/cows/vader-koala.cow
/usr/local/share/cows/vader.cow
/usr/local/share/cows/www.cow
13:54:07
#[root@fbsd5:cowsay]# pkg_info -L cowsay
[root@fbsd5:cowsay]# pkg_info -a | grep cowsay
Information for cowsay-3.03_1:
cowsay is a configurable talking ASCII cow (and other characters),
WWW: http://www.nog.net/~tony/warez/cowsay.shtml
pkg_info: can't find package 'cowsay' installed or in a file!
13:54:15
#[root@fbsd5:cowsay]# echo Hello | cowsay -f /usr/local/share/cows/skeleton.cow
[root@fbsd5:cowsay]# pkg_info -L cowsay-3.03_1
Information for cowsay-3.03_1:
Files:
/usr/local/man/man1/cowsay.1.gz
/usr/local/man/man1/cowthink.1.gz
/usr/local/bin/cowsay
/usr/local/bin/cowthink
/usr/local/share/cows/beavis.zen.cow
/usr/local/share/cows/bong.cow
/usr/local/share/cows/box.cow
...
 -------
          \      (__)
           \     /oo|
            \   (_"_)*+++++++++*
                   //I#\\\\\\\\I\
                   I[I|I|||||I I `
                   I`I'///'' I I
                   I I       I I
                   ~ ~       ~ ~
                     Scowleton
13:55:10
#[root@fbsd5:cowsay]# pkg_delete -x cowsay
[root@fbsd5:cowsay]# pkg_delete cowsay
pkg_delete: no such package 'cowsay' installed
13:55:14
#[root@fbsd5:cowsay]# echo Hello | cowsay -f /usr/local/share/cows/skeleton.cow
bash: /usr/local/bin/cowsay: No such file or directory
13:56:06
#[root@fbsd5:cowsay]# pkg_delete -x cowsay
[root@fbsd5:cowsay]# man pkg_delete
PKG_DELETE(1)           FreeBSD General Commands Manual          PKG_DELETE(1)
NAME
     pkg_delete -- a utility for deleting previously installed software pack-
     age distributions
SYNOPSIS
     pkg_delete [-dDfGinrvxX] [-p prefix] pkg-name ...
     pkg_delete -a [flags]
DESCRIPTION
     The pkg_delete command is used to delete packages that have been previ-
...
             cally expands shell glob patterns in the pkg-name).
     -x      Treat the pkg-name as a regular expression and delete all pack-
             ages whose names match that regular expression.  Multiple regular
             expressions could be provided, in that case pkg_delete deletes
             all packages that match at least one regular expression from the
             list.
     -X      Like -x, but treats the pkg-name as an extended regular expres-
             sion.
     -r      Recursive removal.  In addition to specified packages, delete all
             packages that depend on those packages as well.
прошло 12 минут
14:08:19
#[root@fbsd5:cowsay]#
     * Libraries                                                                                                6
   No-screenshot
   FSP is a UDP-based protocol for transferring files. It has many benefits over FTP, mainly for running anonymous
   archives. It is usable on lines with high packet loss ratio (70% WiFi), can go behind firewalls and unnoticed by
   PDFResurrect is a tool aimed at analyzing PDF documents. The PDF format allows for previous document changes to
   port scans (because of UDP), does not overload networks when hosting ISOs or movies, share files on modem lines
   be retained in a more recent version of the document, thereby creating a running history of changes for the
   without eating all of the bandwidth, and keeps lamers away from your site (they don't know how to get to it).
   document. This tool attempts to extract all previous versions while also producing a summary of changes between
   This project is active continuation of the FSP code base (abandoned 1996-2003).
   versions. It can also "scrub" or write data over the original instances of PDF objects that have been modified
   or deleted, in an effort to disguise information from previous versions that might not be intended for anyone
   else to read.
   Changes: This is a bugfix release. A indefinite stall would occur if a trailer for linearized PDF could not be
   found. This case is probably because the PDF is using xref streams.
     * GPLv3
     * Security
     * Utilities
Icon-download-wh Icon-home-wh 11 Sep 10:47 File Service Protocol 2.8.1b25
   No-screenshot
14:08:20
#[root@fbsd5:cowsay]#

14:08:20
#[root@fbsd5:cowsay]#

14:08:20
#[root@fbsd5:cowsay]# ls -l /tmp/
total 126
drwxrwxrwt  2 root  wheel          512 Sep  8 14:12 .ICE-unix
-r--r--r--  1 root  wheel           11 Sep  7 05:31 .X0-lock
drwxrwxrwt  2 root  wheel          512 Sep 10 12:24 .X11-unix
drwxrwxrwt  2 root  wheel          512 Sep  7 05:31 .XIM-unix
-rw-------  1 root  wheel          167 Sep  7 10:15 .Xauth7iu3l8
-rw-------  1 root  wheel           49 Jul 24 16:10 .Xauth7nmoqG
-rw-------  1 user  wheel           49 Jul 24 16:03 .Xauth8A9uGq
-rw-------  1 root  wheel           49 Jul 24 15:54 .XauthCuihBu
-rw-------  1 user  wheel           49 Jul 24 16:12 .XauthEWHAR4
...
drwxr-xr-x  2 root  wheel          512 Mar 28  2008 lilalo-install-temp-1212
drwxr-xr-x  2 root  wheel          512 Mar 28  2008 lilalo-install-temp-1241
drwxr-xr-x  2 root  wheel          512 Sep 10 15:00 noexit
-rw-r--r--  1 root  wheel        10058 Sep 11 15:08 pstree-2.32.tar.gz
-rw-r--r--  1 user  wheel         1308 Sep 10 14:50 pw
-rw-r--r--  1 user  wheel          799 Sep 10 12:17 pw-useradd_help
-rw-r--r--  1 user  wheel           34 Sep  9 14:23 test
-rw-r--r--  1 user  wheel           28 Sep  9 14:43 test2
-rw-r--r--  1 root  wheel            0 Sep 10 15:26 vova11111
-rw-r--r--  1 user  wheel            0 Sep  8 15:14 ~bad~name~
14:08:23
#[root@fbsd5:cowsay]# ls -l /tmp/pstree-2.32.tar.gz
-rw-r--r--  1 root  wheel  10058 Sep 11 15:08 /tmp/pstree-2.32.tar.gz
14:08:26
#[root@fbsd5:cowsay]#

14:08:27
#[root@fbsd5:cowsay]#

14:08:27
#[root@fbsd5:cowsay]#

14:09:39
#[root@fbsd5:cowsay]#
          lease-after
   Projects / cowsay
Local ad       :
   Save to disk
                    ibility bug when Text::Wrap changed between Perl 5.005_02 and 5.005_03 was fixed; it should now
   Downl              1
                             nstaller bug exacerbated by Solaris is now fixed. Tab handling is greatly improved
   More
                         age --
   cowsay + Handhelds
           ormation
                    y way to add speaking and thinking cows (and a few other creatures) to anything. Any message
   you like, even in large figlet letters, can be rattled off by these ASCII critters. Cowsay comes with over 40
           s that can be bent to your sick and twisted will. New "cows" can be easily bred by those versed in the
                    arts. Cowsay is more useful than most of the items found in SkyMall catalogues, and a lot less
            Text Processing
         sfer complete
     Tags   Text Processing
Are you sure you want to quit? (y)
14:09:40
#[root@fbsd5:cowsay]#

14:09:40
#[root@fbsd5:cowsay]#

14:09:40
#[root@fbsd5:cowsay]#

14:09:52
#[root@fbsd5:~]# lynx http://freshmeat.net
     * About
   feed for cowsayan administration and 16 Rally 0.5.0       he PostgreSQL database and derivative products such as
     * Login
   cowsSignup__________ SearchreSQL, Pervasive Postgres, and SRA PowerGres. It includes a graphical administration
     * Lost password?
RssNo-screenAllt                         ical EXPLAIN, a procedural code editor, an SQL/shell/batch scheduling
   Fm_logosiHandhelds01
Rss SeaHomerMac OS Xcowsay  h 11 Sep 11:16eRally 0.5.0igned to answer the needs of most users, from writing simple
       Articlesx
   No-sBrowse Projects by Tagent with a user interface which allows a user to install, update, and remove packages
...
Using file://localhost/tmp/L95972-2693TMP.html.gz
   Cowsay is the easy way to add speaking and thinking cows (and a few other creatures) to anything. Any message
 H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list
   you like, even in large figlet letters, can be rattled off by these ASCII critters. Cowsay comes with over 40
   creatures that can be bent to your sick and twisted will. New "cows" can be easily bred by those versed in the
   appropriate dark arts. Cowsay is more useful than most of the items found in SkyMall catalogues, and a lot less
(Text entry field) Enter text. Use UP or DOWN arrows or tab to move off.
            Enter text into the field by typing on the keyboard
  Arrow keys: Up and Down to move.  Right to follow a link; Left to go back.
    Ctrl-U to delete all text in field, [Backspace] to delete a character
14:12:02
#[root@fbsd5:~]#

14:12:02
#[root@fbsd5:~]#

14:12:04
#[root@fbsd5:~]# ls -l cowsay-3.03.tar.gz
[root@fbsd5:~]# ls -l
total 1860
-rw-------  1 root  wheel      467 Sep  7 10:16 .ICEauthority
drwx------  2 root  wheel      512 Jul 24 16:12 .Trash
-rw-------  1 root  wheel        0 Sep  7 10:15 .Xauthority
-rw-------  1 root  wheel    11146 Sep 11 14:32 .bash_history
-rw-r--r--  1 root  wheel       19 Jul 24 19:40 .bash_profile
-rw-r--r--  1 root  wheel       38 Jul 24 19:40 .bashrc
drwx------  3 root  wheel      512 Jul 24 16:10 .config
-rw-r--r--  2 root  wheel      801 Jan 16  2008 .cshrc
...
-rw-r--r--  1 root  wheel    15189 Sep 11 15:11 cowsay-3.03.tar.gz
-rw-r--r--  1 root  wheel        0 Sep 10 15:02 files
drwxr-xr-x  2 root  wheel      512 Sep 10 15:30 filesvova
-rw-r--r--  1 root  wheel     5160 Mar 28  2008 install
-rw-r--r--  1 root  wheel  1714374 Sep  7 11:35 lynx-2.8.7d7.tbz
-rw-------  1 root  wheel    54239 Jul 24 19:01 mbox
-rw-r--r--  1 root  wheel        0 Jul 24 16:12 nautilus-debug-log.txt
-rwxr-xr-x  1 root  wheel      727 Sep  7 05:30 prepare-freebsd.sh
drwxr-xr-x  2 root  wheel      512 Sep 10 15:05 tmp
-rw-r--r--  1 root  wheel  15189 Sep 11 15:11 cowsay-3.03.tar.gz
14:12:10
#[root@fbsd5:~]# date
Fri Sep 11 15:12:12 EEST 2009
14:12:25
#[root@fbsd5:~]# cd cowsay-3.03
[root@fbsd5:~]# tar xvzf cowsay-3.03.tar.gz
x cowsay-3.03/ChangeLog
x cowsay-3.03/INSTALL
x cowsay-3.03/LICENSE
x cowsay-3.03/MANIFEST
x cowsay-3.03/README
x cowsay-3.03/Wrap.pm.diff
x cowsay-3.03/install.sh
x cowsay-3.03/pgp_public_key.txt
x cowsay-3.03/cowsay
...
x cowsay-3.03/cows/surgery.cow
x cowsay-3.03/cows/telebears.cow
x cowsay-3.03/cows/three-eyes.cow
x cowsay-3.03/cows/turkey.cow
x cowsay-3.03/cows/turtle.cow
x cowsay-3.03/cows/tux.cow
x cowsay-3.03/cows/udder.cow
x cowsay-3.03/cows/vader-koala.cow
x cowsay-3.03/cows/www.cow
x cowsay-3.03/cows/vader.cow
14:12:28
#[root@fbsd5:cowsay-3.03]# ls
ChangeLog               MANIFEST                cows                    install.sh
INSTALL                 README                  cowsay                  pgp_public_key.txt
LICENSE                 Wrap.pm.diff            cowsay.1
14:12:43
#[root@fbsd5:cowsay-3.03]# vim INSTALL
[root@fbsd5:cowsay-3.03]# vim README
14:13:02
#[root@fbsd5:cowsay-3.03]#
 55
 56 echo Now I need an installation prefix.  I will use /usr/local unless
 57 printf "you give me a better idea here: "
 58 if [ -n "$backdoor" ]; then
 59         prefix=$backdoor
 60         printf "%s (specified on command line)\n" $prefix
 61 else
 62         read prefix
 63 fi
 64
 65 PREFIX=${prefix:-/usr/local}
 66
 67 echo Okay, time to install this puppy.
 68
 69 echo s,%BANGPERL%,!$usethisperl,\; > install.pl
 70 echo s,%PREFIX%,$PREFIX,\; >> install.pl
 71 set -x
 72 mkdir -p $PREFIX/bin || (mkdir $PREFIX; mkdir $PREFIX/bin)
 73 $usethisperl -p install.pl cowsay > $PREFIX/bin/cowsay
14:13:02
#[root@fbsd5:cowsay-3.03]#

14:13:02
#[root@fbsd5:cowsay-3.03]#

14:13:02
#[root@fbsd5:cowsay-3.03]# ls
ChangeLog               MANIFEST                cows                    install.sh
INSTALL                 README                  cowsay                  pgp_public_key.txt
LICENSE                 Wrap.pm.diff            cowsay.1
14:13:10
#[root@fbsd5:cowsay-3.03]#
[root@fbsd5:cowsay-3.03]# chmod +x ./install.sh
14:13:21
#[root@fbsd5:cowsay-3.03]# co
[root@fbsd5:cowsay-3.03]# ./install.sh
===================
cowsay Installation
===================
Searching for useful perl executables...
Found perl in /usr/bin/perl
Found perl in /usr/bin/perl5
Found perl in /usr/local/bin/perl
Found perl in /usr/local/bin/perl5
Found perl in /usr/local/bin/perl5.8.8
...
x cows/udder.cow
x cows/vader-koala.cow
x cows/www.cow
x cows/vader.cow
+ set +x
Okay, let us see if the install actually worked.
Installation complete! Enjoy the cows!
co             colldef        comcontrol     compgen        composeglyphs  conscontrol    cowsay
col            colrm          comm           compile_et     compress       continue       cowthink
colcrt         column         command        complete       config         corrupt_mpeg2
14:13:21
#[root@fbsd5:cowsay-3.03]# cows
cows    cowsay
14:13:35
#[root@fbsd5:cowsay-3.03]# pstree
[root@fbsd5:cowsay-3.03]# cowsay
test
 ______
< test >
 ------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
bash: pstree: command not found
14:14:59
#[root@fbsd5:cowsay-3.03]#
Jul  9  2003  UNIX Comp. Tar   pstree-2.21.tar.Zz  8Kb
Downloaded link: ftp://ftp.thp.Uni-Duisburg.DE/pub/source/pstree-2.32.tar.gzackages from network repositories and
Apr 14  2004  UNIX Compr. Tar  pstree-2.24.tar.Z  14Kb 522Kb
Suggested file name: pstree-2.32.tar.gz               he user interface is split into two independent parts: a
Apr 14  2004  GNU Compr. Tar   pstree-2.25.tar.Zz  8Kb
   Save to disk                                            interface contains package searching and category
Oct 15  2004  UNIX Compr. Tar  pstree-2.26.tar.gz 14KbKbtab to move off.ack.
Standard download options:                              eyboard             orm.
May 14  2004  GNU Compr. Tar   pstree-2.30.tar.gzgz  73Kbyboard
   Save to disk
...
Jul 15  1993  text/plain       utmpd.c  455 bytes    65Kbn a hierachy. It is useful for examining from whence a
Sep 11  1995  GNU Compr. Tar   xpaint-2.1-PINT-0.5-diffs.tar.gz  3Kbacter
                                                         gzete]=history list
Jan 13  1995Monitoring             x
                                                      Kb
                                                        tab to move off.
                                                      375Kbte a character
                                                        delete]=history list
Data transfer complete
Are you sure you want to quit? (y)
14:14:59
#[root@fbsd5:cowsay-3.03]#

14:14:59
#[root@fbsd5:cowsay-3.03]#

14:15:00
#[root@fbsd5:cowsay-3.03]# cd

14:15:04
#[root@fbsd5:~]# tar xvzf pstree-2.32.tar.gz
[root@fbsd5:~]# ls -l pstree-2.32.tar.gz
-rw-r--r--  1 root  wheel  10058 Sep 11 15:14 pstree-2.32.tar.gz
x README
x pstree.c
14:15:27
#[root@fbsd5:~]# vim pstree.c
  46 #  define PSCMD         "ps -eko uid,pid,ppid,pgid,thcount,args"
  47 #  define PSFORMAT      "%ld %ld %ld %ld %ld %[^\n]"
  48 #  define PSVARS        &P[i].uid, &P[i].pid, &P[i].ppid, &P[i].pgid, &P[i].thcount, P[i].cmd
  49 #  define PSVARSN       6
  50 /************************************************************************/
  51 #elif defined(__linux) || (defined __alpha && defined(_SYSTYPE_BSD) || defined (Tru64))
  52 /* TRU64 contributed by Frank Parkin <fparki AT acxiom.co.uk>
  53  */
  54 #  ifdef __linux
  55 #    define USE_GetProcessesDirect
  56 #    include <glob.h>
  57 #    include <sys/stat.h>
  58 #  endif
  59 #  define UID2USER
  60 #  define HAS_PGID
  61 #  define PSCMD         "ps -eo uid,pid,ppid,pgid,args"
  62 #  define PSFORMAT      "%ld %ld %ld %ld %[^\n]"
  63 #  define PSVARS        &P[i].uid, &P[i].pid, &P[i].ppid, &P[i].pgid, P[i].cmd
  64 #  define PSVARSN       5
14:15:41
#[root@fbsd5:~]#

14:15:41
#[root@fbsd5:~]#

14:15:42
#[root@fbsd5:~]#

14:15:42
#[root@fbsd5:~]# vim README

14:15:47
#[root@fbsd5:~]# gcc -O o pstree pstree.c
[root@fbsd5:~]# gcc
gcc         gccmakedep
gcc: o: No such file or directory
gcc: pstree: No such file or directory
14:16:06
#[root@fbsd5:~]# file pstree
[root@fbsd5:~]# gcc -O -o pstree pstree.c
pstree: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 6.3, dynamically linked (uses shared libs), not stripped
14:16:13
#[root@fbsd5:~]# ./pstree
-+= 00001 root /sbin/init --
 |--= 00151 root adjkerntz -i
 |--= 00625 root /usr/sbin/moused -p /dev/ums0 -t auto -I /var/run/moused.ums0.pid
 |--= 00700 root /sbin/devd
 |--= 00771 root /usr/sbin/syslogd -s
 |--= 00830 root /usr/sbin/usbd
 |--= 00837 root /usr/sbin/moused -p /dev/psm0 -t auto
 |-+= 00926 root /usr/sbin/sshd
 | \-+= 94444 root sshd: user [priv] (sshd)
 |   \-+- 94447 user sshd: user@ttyp1 (sshd)
...
 |--= 57820 user l3-agent (perl5.8.8)
 |--= 62073 root sendmail: accepting connections (sendmail)
 |--= 00983 root /usr/libexec/getty Pc ttyv0
 |--= 00984 root /usr/libexec/getty Pc ttyv1
 |--= 00985 root /usr/libexec/getty Pc ttyv2
 |--= 00986 root /usr/libexec/getty Pc ttyv3
 |--= 00987 root /usr/libexec/getty Pc ttyv4
 |--= 00988 root /usr/libexec/getty Pc ttyv5
 |--= 00989 root /usr/libexec/getty Pc ttyv6
 \--= 00990 root /usr/libexec/getty Pc ttyv7
14:16:24
#[root@fbsd5:~]# pstree
[root@fbsd5:~]# cp ./pstree /bin
-+= 00001 root /sbin/init --
 |--= 00151 root adjkerntz -i
 |--= 00625 root /usr/sbin/moused -p /dev/ums0 -t auto -I /var/run/moused.ums0.pid
 |--= 00700 root /sbin/devd
 |--= 00771 root /usr/sbin/syslogd -s
 |--= 00830 root /usr/sbin/usbd
 |--= 00837 root /usr/sbin/moused -p /dev/psm0 -t auto
 |-+= 00926 root /usr/sbin/sshd
 | \-+= 94444 root sshd: user [priv] (sshd)
...
 |--= 57820 user l3-agent (perl5.8.8)
 |--= 62073 root sendmail: accepting connections (sendmail)
 |--= 00983 root /usr/libexec/getty Pc ttyv0
 |--= 00984 root /usr/libexec/getty Pc ttyv1
 |--= 00985 root /usr/libexec/getty Pc ttyv2
 |--= 00986 root /usr/libexec/getty Pc ttyv3
 |--= 00987 root /usr/libexec/getty Pc ttyv4
 |--= 00988 root /usr/libexec/getty Pc ttyv5
 |--= 00989 root /usr/libexec/getty Pc ttyv6
 \--= 00990 root /usr/libexec/getty Pc ttyv7
14:17:09
#[root@fbsd5:~]# ipfw -list
[root@fbsd5:~]# ipfw
usage: ipfw [options]
do "ipfw -h" or see ipfw manpage for details
ipfw: illegal option -- l
usage: ipfw [options]
do "ipfw -h" or see ipfw manpage for details
14:17:13
#[root@fbsd5:~]# ipfw show
ipfw: getsockopt(IP_FW_GET): Protocol not available
14:17:44
#[root@fbsd5:~]# file /boot/kernel/ipfw.ko
[root@fbsd5:~]# find /boot -name ipfw\*
/boot/kernel/ipfw.ko
/boot/GENERIC/ipfw.ko
/boot/kernel.old/ipfw.ko
/boot/kernel/ipfw.ko: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), not stripped
14:18:15
#[root@fbsd5:~]# ipfw list
[root@fbsd5:~]# kldstat
Id Refs Address    Size     Name
 1    5 0xc0400000 7b2d2c   kernel
 2    1 0xc0bb3000 5c304    acpi.ko
 3    1 0xc3bc3000 2000     fire_saver.ko
ipfw: getsockopt(IP_FW_GET): Protocol not available
/dev/ttyp0
14:20:50
$screen -x
/dev/ttyp3
14:20:57
$screen -x
/dev/ttyp7
14:21:19
$screen -x
/dev/ttyp8
14:21:41
#[user@fbsd5:~]$ su -
[user@debian1:~]$ ssh 192.168.16.25
Password:
Last login: Fri Sep 11 14:48:21 2009 from 192.168.16.1
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
...
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
l3-agent is already running: pid=57820; pidfile=/home/user/.lilalo/l3-agent.pid
Password:
l3-agent is already running: pid=33829; pidfile=/root/.lilalo/l3-agent.pid
14:21:45
#[root@fbsd5:~]# kldstat
Id Refs Address    Size     Name
 1    6 0xc0400000 7b2d2c   kernel
 2    1 0xc0bb3000 5c304    acpi.ko
 3    1 0xc3bc3000 2000     fire_saver.ko
 4    1 0xc6020000 d000     ipfw.ko
14:21:56
#[root@fbsd5:~]# exit
[root@fbsd5:~]# ipfw list
00001 allow ip from any to any
65535 deny ip from any to any
exit
14:22:07
$\
>
14:22:08
$ssh 192.168.16.240

14:22:11
#[user@fbsd5:~]$

14:22:12
#[user@fbsd5:~]$ exit
exit
Connection to 192.168.16.25 closed.
прошло 55 минут
/dev/ttyp3
15:18:08
$ops awux | grep screen
bash: ops: command not found
15:18:16
$kill -9 1903 2482

15:18:26
$ps awux | grep screen
user      2891  0.0  0.1   4624   744 ttyp6    R+   16:18   0:00 grep screen
15:18:28
$screen -x
15:18:32
$screen -x
15:18:37
$ps awux |
user      2965  0.0  0.1   4624   744 ttyp6    R+   16:18   0:00 grep screen

Статистика

Время первой команды журнала13:32:04 2009- 9-11
Время последней команды журнала15:18:37 2009- 9-11
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, %12.87
Процент синтаксически неверно набранных команд, % 1.98
Суммарное время работы с терминалом *, час 0.84
Количество командных строк в единицу времени, команда/мин 2.00
Частота использования команд
[root@fbsd5:cowsay]#30|============================| 28.30%
[root@fbsd5:~]#22|====================| 20.75%
[root@fbsd5:cowsay-3.03]#14|=============| 13.21%
[root@fbsd5:src]#11|==========| 10.38%
[user@fbsd5:~]$7|======| 6.60%
screen6|=====| 5.66%
[root@fbsd5:ports]#5|====| 4.72%
ps2|=| 1.89%
cowsay2|=| 1.89%
grep2|=| 1.89%
less1|| 0.94%
kill1|| 0.94%
ssh1|| 0.94%
ops1|| 0.94%
\1|| 0.94%
____
*) Интервалы неактивности длительностью 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$