/l3/trainings/nt-bsdnet/2006-04-03/fbsd3.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 |
|
#ping -c 2 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes --- 80.91.162.154 ping statistics --- 2 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 2 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes --- 80.91.162.154 ping statistics --- 2 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 2 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 2 packets transmitted, 0 packets received, 100% packet loss |
#screen
|
#ls
.ICEauthority .history .recently-used .Xauthority .k5login .ssh .bash_history .kde .thunderbird .bash_profile .lilalo .viminfo .bashrc .login .vimrc .centericq .mc .xinitrc .cshrc .mcop Desktop .gconf .mcoprc e .gconfd .metacity log.eci .gnome .micq log.ecp .gnome2 .mozilla rc.firewall1 .gnome2_private .nautilus zlogin .gstreamer-0.8 .profile zshenv .gtkrc-1.2-gnome2 .qt zshrc |
#mc
|
#find / squid-2.4
![]() /usr/include/machine/privatespace.h /usr/include/machine/proc.h /usr/include/machine/profile.h /usr/include/machine/psl.h /usr/include/machine/ptrace.h /usr/include/machine/reg.h /usr/include/machine/reloc.h /usr/include/machine/resource.h /usr/include/machine/runq.h /usr/include/machine/segments.h ... /usr/include/netgraph/atm/ng_sscfu.h /usr/include/netgraph/atm/ng_sscop.h /usr/include/netgraph/atm/ng_uni.h /usr/include/netgraph/atm/ngatmbase.h /usr/include/netgraph/bluetooth /usr/include/netgraph/bluetooth/include /usr/include/netgraph/bluetooth/include/ng_bluetooth.h /usr/include/netgraph/bluetooth/include/ng_bt3c.h /usr/include/netgraph/bluetooth/include/ng_btsocket.h /usr/include/netgraph/bluetooth/include/ng_btsocket_hci_raw.h |
#e /root/squid.conf
# The refresh_pattern lines are checked in the order listed here. # The first entry which matches is used. If none of the entries # match, then the default will be used. # # Note, you must uncomment all the default lines if you want # to change one. The default setting is only active if none is # used. # #Default: # refresh_pattern ^ftp: 1440 20% 10080 # refresh_pattern ^gopher: 1440 0% 1440 # refresh_pattern . 0 20% 4320 # TAG: reference_age |
#ping -c 2 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes --- 80.91.162.154 ping statistics --- 2 packets transmitted, 0 packets received, 100% packet loss |
#startx
X Window System Version 6.8.2 Release Date: 9 February 2005 X Protocol Version 11, Revision 0, Release 6.8.2 Build Operating System: FreeBSD 6.0 i386 [ELF] Current Operating System: FreeBSD fbsd3.unix.nt 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Mon Apr 3 04:11:45 EEST 2006 root@fbsd3.unix.nt:/usr/src/sys/i386/compile/MY i386 Build Date: 12 October 2005 Before reporting problems, check http://wiki.X.Org to make sure that you have the latest version. Module Loader present Markers: (--) probed, (**) from config file, (==) default setting, ... most likely the X server was shut down or you killed/destroyed the application. The application 'nautilus' lost its connection to the display :0.0; most likely the X server was shut down or you killed/destroyed the application. The application 'Gecko' lost its connection to the display :0.0; most likely the X server was shut down or you killed/destroyed the application. FreeFontPath: FPE "/usr/X11R6/lib/X11/fonts/misc/" refcount is 2, should be 1; fixing. xinit: connection to X server lost. |
#vi /etc/natd.conf
|
#find / squid.conf
![]() /usr/include/machine/ppireg.h /usr/include/machine/privatespace.h /usr/include/machine/proc.h /usr/include/machine/profile.h /usr/include/machine/psl.h /usr/include/machine/ptrace.h /usr/include/machine/reg.h /usr/include/machine/reloc.h /usr/include/machine/resource.h /usr/include/machine/runq.h ... /usr/include/netgraph/atm/ng_ccatm.h /usr/include/netgraph/atm/ng_sscfu.h /usr/include/netgraph/atm/ng_sscop.h /usr/include/netgraph/atm/ng_uni.h /usr/include/netgraph/atm/ngatmbase.h /usr/include/netgraph/bluetooth /usr/include/netgraph/bluetooth/include /usr/include/netgraph/bluetooth/include/ng_bluetooth.h /usr/include/netgraph/bluetooth/include/ng_bt3c.h /usr/include/netgraph/bluetooth/include/ng_btsocket.h |
#find ~/ squid.conf
/root/.gnome/gnome-vfs/.trash_entry_cache /root/zlogin /root/zshenv /root/zshrc /root/.micq /root/.micq/micqrc /root/.micq/status /root/.micq/history /root/.micq/history/nick-Vladimir Ganshin.log /root/.micq/history/333113742.log ... /root/.thunderbird/0dv2vhkf.default/Mail/127.0.0.1/popstate.dat /root/.thunderbird/0dv2vhkf.default/panacea.dat /root/.thunderbird/0dv2vhkf.default/history.mab /root/.thunderbird/0dv2vhkf.default/secmod.db /root/.thunderbird/0dv2vhkf.default/cert8.db /root/.thunderbird/0dv2vhkf.default/key3.db /root/.thunderbird/0dv2vhkf.default/virtualFolders.dat /root/.thunderbird/0dv2vhkf.default/compatibility.ini /root/squid.conf squid.conf |
#e /root/squid.conf
# #Default: # TAG: log_fqdn on|off Turn this on if you wish to log fully qualified domain names # Squid will write the Referer field from HTTP requests to the # in the access.log. To do this Squid does a DNS lookup of all # filename specified here. By default referer_log is disabled. # IP's conne # #Default:atency, which makes your cache seem slower for interactive ... # pid_filename /var/run/squid.pid # TAG: debug_options # Logging options are set as section,level where each source file # is assigned a unique section. Lower levels result in less # output, Full debugging (level 9) can result in a very large # log file, so be careful. The magic word "ALL" sets debugging # levels for all sections. We recommend normally running with # "ALL,1". # #Default: |
#ping 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 8 packets transmitted, 0 packets received, 100% packet loss |
#ping ya.ru
![]() ^C |
#ping ya.ru
![]() ^C |
#ping 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 12 packets transmitted, 0 packets received, 100% packet loss |
#ping 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 14 packets transmitted, 0 packets received, 100% packet loss |
#e /etc/resolv.conf
domain unix.ntlv.conf" 2L, 40C nameserver 192.168.15.23 |
#e /etc/resolv.conf
domain unix.ntlv.conf" 2L, 40C nameserver 192.168.15.23 |
#ping 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 78 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes --- 80.91.162.154 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 2 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes --- 80.91.162.154 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes --- 80.91.162.154 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes --- 80.91.162.154 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#grep ident /etc/services
auth 113/tcp ident tap #Authentication Service auth 113/udp ident tap #Authentication Service # identify "authentication domains" tcp-id-port 1999/tcp #cisco identification port tcp-id-port 1999/udp #cisco identification port |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#ping -c 4 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes --- 80.91.162.154 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#lock
Key: Again: lock: /dev/ttyp4 on fbsd3.unix.nt. timeout in 15 minutes. time now is Thu Apr 6 12:55:48 EEST 2006 Key: |
#gnome-smproxy: unable to open display :0.0
ïÛÉÂËÁ ÍÅÎÅÄÖÅÒÁ ÏËÏÎ: Unable to open X display :0.0 |
#lock
Key: Again: lock: /dev/ttyp4 on fbsd3.unix.nt. timeout in 15 minutes. time now is Thu Apr 6 12:56:31 EEST 2006 Key: |
#screen
|
#screen
|
#ping ya.ru
![]() Left File Command Options Right </v></usr/ports/misc/mcv> Name Size MTime Name Size MTime /.mozilla 512Mar 31 12:18/.. UP--DIR /.snap 512Mar 31 11:52/files 2048Mar 31 11:54 /bin 1024Mar 31 11:52/work 512Apr 2 23:52 /boot 512Mar 31 11:57 Makefile 2708Jul 13 2005 /cdrom 512Mar 31 11:52 distinfo 90Feb 4 2004 ~compat 10Mar 31 11:57 pkg-descr 401Feb 12 2003 /dev 512Jan 1 1970 pkg-plist 4193Feb 8 2005 ... /proc 512Nov 3 10:09 /rescue 2560Mar 31 11:52 /root 512Apr 2 23:52 /.mozilla /.. Hint: Bring text back from the dead with C-y. # ^C 1Help 2Menu 3View 4Edit 5Copy 6RenMov 7Mkdir 8Delete 9PullDn 10Quit |
#e /root/squid.conf
# TAG: maximum_object_size_in_memory (bytes) http_port 3128 # Objects greater than this size will not be attempted to kept in # the memory cache. This should be set high enough to keep objects # spool/squid 1000 16 256 #Default: maximum_object_size_in_memory 8 KB # enough to keep larger objects from hoarding cache_mem . # udp_inipcache_size (number of entries) # TAG: ipcache_high (percent)5.255 ... -- INSERT -- 3 fewer linesecify other caches in a hierarchy, use the format: # # cache_peer hostname type http_port icp_port # # For example, # # # proxy icp # # hostname type port port options # # -------------------- -------- ----- ----- ----------- |
#ping 80.91.162.154
![]() PING 80.91.162.154 (80.91.162.154): 56 data bytes ^C --- 80.91.162.154 ping statistics --- 20 packets transmitted, 0 packets received, 100% packet loss |
#ping ya.ru
![]() ^C |
#ls -l
total 742 -rw------- 1 root wheel 696 6 ÁÐÒ 10:24 .ICEauthority -rw------- 1 root wheel 225 4 ÁÐÒ 16:47 .Xauthority -rw------- 1 root wheel 8941 6 ÁÐÒ 14:16 .bash_history -rw-r--r-- 1 root wheel 13 2 ÁÐÒ 22:00 .bash_profile -rw-r--r-- 1 root wheel 35 2 ÁÐÒ 22:00 .bashrc drwx------ 5 root wheel 512 5 ÁÐÒ 16:43 .centericq -rw-r--r-- 2 root wheel 801 3 ÎÏÑ 10:12 .cshrc drwx------ 4 root wheel 512 6 ÁÐÒ 12:55 .gconf drwx------ 2 root wheel 512 6 ÁÐÒ 12:56 .gconfd ... drwxr-xr-x 2 root wheel 512 5 ÁÐÒ 16:22 Desktop lrwxr-xr-x 1 root wheel 18 5 ÁÐÒ 08:58 e -> /usr/local/bin/vim -rw------- 1 root wheel 1264 3 ÁÐÒ 06:33 log.eci -rw------- 1 root wheel 1263 3 ÁÐÒ 06:33 log.ecp -rwxr-xr-x 1 root wheel 2782 5 ÁÐÒ 17:13 rc.firewall1 -rw-r--r-- 1 root wheel 524998 6 ÁÐÒ 14:19 squid-2.5.11_1.tbz -rw-r--r-- 1 root wheel 87757 6 ÁÐÒ 14:21 squid.conf -r--r--r-- 1 root wheel 581 4 ÁÐÒ 03:08 zlogin -r--r--r-- 1 root wheel 1565 4 ÁÐÒ 03:08 zshenv -r--r--r-- 1 root wheel 5285 5 ÁÐÒ 10:23 zshrc |
#pkg_add -r squid-2.5.11_1.tbz
![]() ^CSignal 2 received, cleaning up.. |
#man pkg_add
|
#pkg_add squid-2.5.11_1.tbz
===> Pre-installation configuration for squid-2.5.11_1 There is no group 'squid' on this system, so I will try to create it: Group 'squid' created successfully: squid:*:100: There is no account 'squid' on this system, so I will try to create it: User 'squid' created successfully: squid:*:100:100::0:0:squid caching-proxy pseudo user:/usr/local/squid:/usr/sbin/nologin Creating /usr/local/squid/cache... Creating /usr/local/squid/logs... Creating /usr/local/etc/squid... ... Please note that /usr/local/etc/rc.d/squid.sh is now an rcNG script by default. This means that squid will not start automatically at boot time. To enable squid, set squid_enable=yes in either /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid See /usr/local/etc/rc.d/squid.sh for more configuration options. If you want to install an old style rc script, run 'make config' and deselect the option to install an rcNG script. |
#cp squid
![]() squid-2.5.11_1.tbz squid.conf |
#cp /usr/local/etc/squid/squid.conf ~/squid.conf.sample
|
#ls -l -A
total 860 -rw------- 1 root wheel 696 6 ÁÐÒ 10:24 .ICEauthority -rw------- 1 root wheel 225 4 ÁÐÒ 16:47 .Xauthority -rw------- 1 root wheel 8941 6 ÁÐÒ 14:16 .bash_history -rw-r--r-- 1 root wheel 13 2 ÁÐÒ 22:00 .bash_profile -rw-r--r-- 1 root wheel 35 2 ÁÐÒ 22:00 .bashrc drwx------ 5 root wheel 512 5 ÁÐÒ 16:43 .centericq -rw-r--r-- 2 root wheel 801 3 ÎÏÑ 10:12 .cshrc drwx------ 4 root wheel 512 6 ÁÐÒ 12:55 .gconf drwx------ 2 root wheel 512 6 ÁÐÒ 12:56 .gconfd ... lrwxr-xr-x 1 root wheel 18 5 ÁÐÒ 08:58 e -> /usr/local/bin/vim -rw------- 1 root wheel 1264 3 ÁÐÒ 06:33 log.eci -rw------- 1 root wheel 1263 3 ÁÐÒ 06:33 log.ecp -rwxr-xr-x 1 root wheel 2782 5 ÁÐÒ 17:13 rc.firewall1 -rw-r--r-- 1 root wheel 524998 6 ÁÐÒ 14:19 squid-2.5.11_1.tbz -rw-r--r-- 1 root wheel 87757 6 ÁÐÒ 14:21 squid.conf -rw-r----- 1 root wheel 120581 6 ÁÐÒ 14:24 squid.conf.sample -r--r--r-- 1 root wheel 581 4 ÁÐÒ 03:08 zlogin -r--r--r-- 1 root wheel 1565 4 ÁÐÒ 03:08 zshenv -r--r--r-- 1 root wheel 5285 5 ÁÐÒ 10:23 zshrc |
#cp squid
![]() squid-2.5.11_1.tbz squid.conf squid.conf.sample |
#cp squid
![]() squid-2.5.11_1.tbz squid.conf squid.conf.sample |
#cp squid.conf /usr/local/etc/squid/squid.conf
|
#cd /var/log
|
#ls
Xorg.0.log maillog sendmail.st.0 Xorg.0.log.old maillog.0.bz2 sendmail.st.1 Xorg.8.log maillog.1.bz2 servicelog Xorg.8.log.old messages setuid.today auth.log messages.0.bz2 setuid.yesterday cron mount.today slip.log debug.log pf.today userlog dmesg.today ppp.log wtmp dmesg.yesterday scrollkeeper.log xferlog lastlog security lpd-errs sendmail.st |
#mkdir squid
|
#ls
Xorg.0.log maillog sendmail.st.0 Xorg.0.log.old maillog.0.bz2 sendmail.st.1 Xorg.8.log maillog.1.bz2 servicelog Xorg.8.log.old messages setuid.today auth.log messages.0.bz2 setuid.yesterday cron mount.today slip.log debug.log pf.today squid dmesg.today ppp.log userlog dmesg.yesterday scrollkeeper.log wtmp lastlog security xferlog lpd-errs sendmail.st |
#squid
2006/04/06 14:26:06| parseConfigFile: line 2288 unrecognized: 'delay_pools 1' 2006/04/06 14:26:06| parseConfigFile: line 2301 unrecognized: 'delay_class 1 2' 2006/04/06 14:26:06| parseConfigFile: line 2407 unrecognized: 'delay_parameters 1 -1/-1 8000/8000' |
#squid -z
2006/04/06 14:26:22| parseConfigFile: line 2288 unrecognized: 'delay_pools 1' 2006/04/06 14:26:22| parseConfigFile: line 2301 unrecognized: 'delay_class 1 2' 2006/04/06 14:26:22| parseConfigFile: line 2407 unrecognized: 'delay_parameters 1 -1/-1 8000/8000' 2006/04/06 14:26:22| Creating Swap Directories FATAL: Failed to make swap directory /var/spool/squid: (13) Permission denied Squid Cache (Version 2.5.STABLE11): Terminated abnormally. CPU Usage: 0.001 seconds = 0.000 user + 0.001 sys Maximum Resident Size: 0 KB Page faults with physical i/o: 0 |
#cd /var/spool/
|
#mkdir squid
|
#ls
clientmqueue lock mqueue output cups lpd opielocks squid |
#ls -A -l
total 16 drwxrwx--- 2 smmsp smmsp 512 6 ÁÐÒ 09:13 clientmqueue drwxr-xr-x 3 root daemon 512 31 ÍÁÒ 12:07 cups drwxrwxr-x 2 uucp dialer 512 6 ÁÐÒ 09:12 lock drwxr-xr-x 2 root daemon 512 3 ÎÏÑ 10:09 lpd drwxr-xr-x 2 root daemon 512 5 ÁÐÒ 15:55 mqueue drwx------ 2 root daemon 512 3 ÎÏÑ 10:09 opielocks drwxr-xr-x 3 root daemon 512 31 ÍÁÒ 11:52 output drwxr-xr-x 2 root wheel 512 6 ÁÐÒ 14:27 squid |
#cd squid/
|
#ls -A -l
total 0 |
#sockstat -4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS squid squid 2314 6 udp4 192.168.15.23:63218 192.168.15.23:53 root xinetd 565 5 tcp4 *:21 *:* root xinetd 565 7 tcp4 *:13 *:* root xinetd 565 8 tcp4 *:7 *:* root xinetd 565 9 tcp4 *:119 *:* root xinetd 565 10 tcp4 *:110 *:* root sendmail 501 4 tcp4 *:25 *:* root sendmail 501 6 tcp4 *:587 *:* root sshd 496 4 tcp4 *:22 *:* bind named 371 20 udp4 192.168.15.23:53 *:* bind named 371 21 tcp4 192.168.15.23:53 *:* bind named 371 22 udp4 127.0.0.1:53 *:* bind named 371 23 tcp4 127.0.0.1:53 *:* bind named 371 24 udp4 *:52068 *:* bind named 371 26 tcp4 127.0.0.1:953 *:* root syslogd 310 8 udp4 *:514 *:* |
#squid stop
2006/04/06 14:29:56| parseConfigFile: line 2288 unrecognized: 'delay_pools 1' 2006/04/06 14:29:56| parseConfigFile: line 2301 unrecognized: 'delay_class 1 2' 2006/04/06 14:29:56| parseConfigFile: line 2407 unrecognized: 'delay_parameters 1 -1/-1 8000/8000' |
#e /usr/local/etc/squid/
" Press ? for keyboard shortcuts " Sorted by name (.bak,~,.o,.h,.info,.swp,.obj at end of list) "= /usr/local/etc/squid/ ../ errors/ icons/ cachemgr.conf cachemgr.conf.default mib.txt mime.conf mime.conf.default msntauth.conf.default squid.confl/etc/squid/" Illegal file name squid.conf.default |
#e /usr/local/etc/squid/squid.conf
# # hostname type port port options # # -------------------- -------- ----- ----- ----------- # cache_peer parent.foo.net parent 3128 3130 [proxy-only] # cache_peer sib1.foo.net sibling 3128 3130 [proxy-only] # cache_peer sib2.foo.net sibling 3128 3130 [proxy-only] # # type: either 'parent', 'sibling', or 'multicast'. # # proxy_port: The port number where the cache listens for proxy # requests. ... # neighbor machine has the UDP echo port # enabled in its /etc/inetd.conf file. # # options: proxy-only # weight=n # ttl=n # no-query # default # round-robin # multicast-responder |
#squid
2006/04/06 14:30:50| parseConfigFile: line 2288 unrecognized: 'delay_pools 1' 2006/04/06 14:30:50| parseConfigFile: line 2301 unrecognized: 'delay_class 1 2' 2006/04/06 14:30:50| parseConfigFile: line 2407 unrecognized: 'delay_parameters 1 -1/-1 8000/8000' |
#squid stop
2006/04/06 14:31:09| parseConfigFile: line 2288 unrecognized: 'delay_pools 1' 2006/04/06 14:31:09| parseConfigFile: line 2301 unrecognized: 'delay_class 1 2' 2006/04/06 14:31:09| parseConfigFile: line 2407 unrecognized: 'delay_parameters 1 -1/-1 8000/8000' |
#e /usr/local/etc/squid/squid.conf
# NOTE, wccp_incoming_address and wccp_outgoing_address can not have # the same value since they both use port 2048. # wccp_incoming_address 0.0.0.0 DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option) # ----------------------------------------------------------------------------- # This represents the number of delay pools to be used. For example, # if you have one class 2 delay pool and one class 3 delays pool, you # TAG: delay_poolsess 0.0.0.0 # # udp_ouTo enable this option, you must use --enable-delay-pools with the ... # TAG: cache_peer # To specify other caches in a hierarchy, use the format: # # cache_peer hostname type http_port icp_port # # For example, # # # proxy icp # # hostname type port port options # # -------------------- -------- ----- ----- ----------- |
#squid start
2006/04/06 14:32:41| parseConfigFile: line 2407 unrecognized: 'delay_parameters 1 -1/-1 8000/8000' |
#squid stop
2006/04/06 14:32:59| parseConfigFile: line 2407 unrecognized: 'delay_parameters 1 -1/-1 8000/8000' |
#e /usr/local/etc/squid/squid.conf
# delay_access 2 allow lotsa_little_clients # delay_access 2 deny all # #Default: # none #delay_access 1 allow mp3 192_168_15_111 #delay_access 1 allow img #delay_access 1 deny all #delay_parameters 1 -1/-1 8000/8000 delay_parameters 1 -1/-1 8000/8000rameters line for each delay pool.w downkbt)s "/usr/local/etc/squid/squid.conf" 2731L, 87760C writtenplained in the # description of delay_class. For a class 1 delay pool, the syntax is: # #delay_parameters pool aggregate # # For a class 2 delay pool: # #delay_parameters pool aggregate individual # # For a class 3 delay pool: # |
#squid start
|
#squid stop
|
#squid -z
2006/04/06 14:34:36| Creating Swap Directories FATAL: Failed to make swap directory /var/spool/squid/00: (13) Permission denied Squid Cache (Version 2.5.STABLE11): Terminated abnormally. CPU Usage: 0.001 seconds = 0.000 user + 0.001 sys Maximum Resident Size: 1740 KB Page faults with physical i/o: 0 |
#chown -R squid:squid /var/spool/squid/
|
#squid -z
2006/04/06 14:35:58| Creating Swap Directories |
#squid
|
#sockstat -4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS squid squid 2430 6 udp4 192.168.15.23:50083 192.168.15.23:53 squid squid 2425 6 udp4 192.168.15.23:52890 192.168.15.23:53 squid squid 2424 6 udp4 192.168.15.23:60289 192.168.15.23:53 squid squid 2423 6 udp4 192.168.15.23:56260 192.168.15.23:53 squid squid 2419 6 udp4 192.168.15.23:51172 192.168.15.23:53 squid squid 2404 6 udp4 192.168.15.23:56052 192.168.15.23:53 squid squid 2403 6 udp4 192.168.15.23:53901 192.168.15.23:53 squid squid 2402 6 udp4 192.168.15.23:61909 192.168.15.23:53 squid squid 2398 6 udp4 192.168.15.23:51679 192.168.15.23:53 ... root sendmail 501 4 tcp4 *:25 *:* root sendmail 501 6 tcp4 *:587 *:* root sshd 496 4 tcp4 *:22 *:* bind named 371 20 udp4 192.168.15.23:53 *:* bind named 371 21 tcp4 192.168.15.23:53 *:* bind named 371 22 udp4 127.0.0.1:53 *:* bind named 371 23 tcp4 127.0.0.1:53 *:* bind named 371 24 udp4 *:52068 *:* bind named 371 26 tcp4 127.0.0.1:953 *:* root syslogd 310 8 udp4 *:514 *:* |
#tail -f /var/log/messages
![]() Apr 6 14:36:44 fbsd3 squid[2352]: Squid Parent: child process 2398 exited due to signal 6 Apr 6 14:36:44 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:36:44 fbsd3 squid[2336]: Squid Parent: child process 2402 exited due to signal 6 Apr 6 14:36:44 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:36:44 fbsd3 squid[2361]: Squid Parent: child process 2404 exited due to signal 6 Apr 6 14:36:47 fbsd3 squid[2341]: Squid Parent: child process 2434 started Apr 6 14:36:47 fbsd3 squid[2361]: Squid Parent: child process 2438 started Apr 6 14:36:47 fbsd3 squid[2336]: Squid Parent: child process 2440 started Apr 6 14:36:47 fbsd3 squid[2352]: Squid Parent: child process 2439 started Apr 6 14:37:05 fbsd3 login: ROOT LOGIN (root) ON ttyv1 ... Apr 6 14:38:06 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:06 fbsd3 squid[2427]: Squid Parent: child process 2430 exited due to signal 6 Apr 6 14:38:06 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:06 fbsd3 squid[2385]: Squid Parent: child process 2425 exited due to signal 6 Apr 6 14:38:09 fbsd3 squid[2390]: Squid Parent: child process 2495 started Apr 6 14:38:09 fbsd3 squid[2299]: Squid Parent: child process 2501 started Apr 6 14:38:09 fbsd3 squid[2385]: Squid Parent: child process 2503 started Apr 6 14:38:09 fbsd3 squid[2322]: Squid Parent: child process 2500 started Apr 6 14:38:09 fbsd3 squid[2427]: Squid Parent: child process 2502 started ^C |
#hosthame fbsd3.fbsd3.unix.nt
![]() bash: hosthame: command not found |
#hostname fbsd3.fbsd3.unix.nt
|
#tail -f /var/log/messages
![]() Apr 6 14:38:06 fbsd3 squid[2299]: Squid Parent: child process 2424 exited due to signal 6 Apr 6 14:38:06 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:06 fbsd3 squid[2427]: Squid Parent: child process 2430 exited due to signal 6 Apr 6 14:38:06 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:06 fbsd3 squid[2385]: Squid Parent: child process 2425 exited due to signal 6 Apr 6 14:38:09 fbsd3 squid[2390]: Squid Parent: child process 2495 started Apr 6 14:38:09 fbsd3 squid[2299]: Squid Parent: child process 2501 started Apr 6 14:38:09 fbsd3 squid[2385]: Squid Parent: child process 2503 started Apr 6 14:38:09 fbsd3 squid[2322]: Squid Parent: child process 2500 started Apr 6 14:38:09 fbsd3 squid[2427]: Squid Parent: child process 2502 started ... Apr 6 14:38:47 fbsd3 squid[2336]: Squid Parent: child process 2440 exited due to signal 6 Apr 6 14:38:47 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:47 fbsd3 squid[2352]: Squid Parent: child process 2439 exited due to signal 6 Apr 6 14:38:47 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:47 fbsd3 squid[2361]: Squid Parent: child process 2438 exited due to signal 6 Apr 6 14:38:50 fbsd3 squid[2341]: Squid Parent: child process 2511 started Apr 6 14:38:50 fbsd3 squid[2336]: Squid Parent: child process 2516 started Apr 6 14:38:50 fbsd3 squid[2361]: Squid Parent: child process 2515 started Apr 6 14:38:50 fbsd3 squid[2352]: Squid Parent: child process 2517 started ^C |
#tail -f /var/log/messages
![]() Apr 6 14:38:47 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:47 fbsd3 squid[2336]: Squid Parent: child process 2440 exited due to signal 6 Apr 6 14:38:47 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:47 fbsd3 squid[2352]: Squid Parent: child process 2439 exited due to signal 6 Apr 6 14:38:47 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:47 fbsd3 squid[2361]: Squid Parent: child process 2438 exited due to signal 6 Apr 6 14:38:50 fbsd3 squid[2341]: Squid Parent: child process 2511 started Apr 6 14:38:50 fbsd3 squid[2336]: Squid Parent: child process 2516 started Apr 6 14:38:50 fbsd3 squid[2361]: Squid Parent: child process 2515 started Apr 6 14:38:50 fbsd3 squid[2352]: Squid Parent: child process 2517 started ^C |
#e /etc/resolv.conf
domain unix.ntlv.conf" 2L, 40C nameserver 192.168.15.23 ~ ~ ~ ~ ~ ~ ~ ~ ... ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
#tail -f /var/log/messages
![]() Apr 6 14:38:47 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:47 fbsd3 squid[2336]: Squid Parent: child process 2440 exited due to signal 6 Apr 6 14:38:47 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:47 fbsd3 squid[2352]: Squid Parent: child process 2439 exited due to signal 6 Apr 6 14:38:47 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:38:47 fbsd3 squid[2361]: Squid Parent: child process 2438 exited due to signal 6 Apr 6 14:38:50 fbsd3 squid[2341]: Squid Parent: child process 2511 started Apr 6 14:38:50 fbsd3 squid[2336]: Squid Parent: child process 2516 started Apr 6 14:38:50 fbsd3 squid[2361]: Squid Parent: child process 2515 started Apr 6 14:38:50 fbsd3 squid[2352]: Squid Parent: child process 2517 started ... Apr 6 14:40:09 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:40:09 fbsd3 squid[2385]: Squid Parent: child process 2503 exited due to signal 6 Apr 6 14:40:09 fbsd3 (squid): ipcache_init: DNS name lookup tests failed. Apr 6 14:40:09 fbsd3 squid[2427]: Squid Parent: child process 2502 exited due to signal 6 Apr 6 14:40:12 fbsd3 squid[2322]: Squid Parent: child process 2541 started Apr 6 14:40:12 fbsd3 squid[2390]: Squid Parent: child process 2543 started Apr 6 14:40:12 fbsd3 squid[2385]: Squid Parent: child process 2544 started Apr 6 14:40:12 fbsd3 squid[2299]: Squid Parent: child process 2545 started Apr 6 14:40:12 fbsd3 squid[2427]: Squid Parent: child process 2546 started ^C |
#host
![]() Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time] [-R number] hostname [server] -a is equivalent to -v -t * -c specifies query class for non-IN data -C compares SOA records on authoritative nameservers -d is equivalent to -v -l lists all hosts in a domain, using AXFR -i IP6.INT reverse lookups -N changes the number of dots allowed before root lookup is done -r disables recursive processing -R specifies number of retries for UDP packets -t specifies the query type -T enables TCP/IP mode -v enables verbose output -w specifies to wait forever for a reply -W specifies how long to wait for a reply -4 use IPv4 query transport only -6 use IPv6 query transport only |
#host 192.168.15.23
23.15.168.192.in-addr.arpa domain name pointer fbsd3.linux.nt. |
#host fbsd3.linux.net
![]() |
#e /etc/na
![]() namedb/ natd.conf |
#e /etc/na
![]() namedb/ natd.conf |
Время первой команды журнала | 09:52:23 2006- 4- 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:40:57 2006- 4- 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 25.74 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.43 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008