ACQUIRING KNOWLEDGE WITH EXAMPLES




UNIX Command

$stat /usr/sbin/famd
  File: `/usr/sbin/famd'
  Size: 147504    	Blocks: 304        IO Block: 4096   regular file
Device: 801h/2049d	Inode: 7572257     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-01-24 00:00:54.000000000 +0530
Modify: 2010-08-03 15:32:44.000000000 +0530
Change: 2012-01-24 00:00:07.000000000 +0530
 Birth: -
$

UNIX Explanation

 Display file or file system status.

File

$ls -l /etc/dpkg/dpkg.cfg
-rw-r--r-- 1 root root 446 Sep 14  2010 /etc/dpkg/dpkg.cfg
$

Explanation

$file /etc/dpkg/dpkg.cfg
/etc/dpkg/dpkg.cfg: ASCII English text
$

Get The Hang

$cat /etc/dpkg/dpkg.cfg
# dpkg configuration file
#
# This file can contain default options for dpkg.  All command-line
# options are allowed.  Values can be specified by putting them after
# the option, separated by whitespace and/or an `=' sign.
#

# Do not enable debsig-verify by default; since the distribution is not using
# embedded signatures, debsig-verify would reject all packages.
no-debsig

# Log status changes and actions to a file.
log /var/log/dpkg.log
$

TOPIC

NETWORK TIME PROTOCOL

Explanation

NTP  stands  for Network  Time  Protocol,  and  it is  an  Internet
protocol used to  synchronize the clocks of computers  to some time
reference.  NTP   is  an  Internet   standard  protocol  originally
developed  by  Professor  David  L.  Mills  at  the  University  of
Delaware.

source: http://www.ntp.org/ntpfaq/NTP-s-def.htm#AEN1259

Get The Hang

$ntpdate in.pool.ntp.org
13 Jan 19:15:49 ntpdate[4295]: step time server 203.200.188.4 offset -1.325297 sec
$date
Fri Jan 13 19:16:01 IST 2012
$

$scm
SCM version 5e5, Copyright (C) 1990-2006 Free Software Foundation.
SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `(terms)' for details.
;loading /usr/share/slib/require
;done loading /usr/share/slib/require.scm
;loading /usr/share/slib/require
;done loading /usr/share/slib/require.scm
;loading /usr/lib/scm/Link
;done loading /usr/lib/scm/Link.scm
;loading /usr/lib/scm/Transcen
;done loading /usr/lib/scm/Transcen.scm
> (+ 1 2 3)
6
> (- ( + 3 4) (- 4 5 ))
#
> 7
> -1
>
;WARNING: "/usr/lib/scm/Iedline.scm": unexpected ")"#
> (- ( + 3 4) (- 4 5 ))
8
>

TOPIC

General Linux System Control Interface

Explanation

Sysctl is a  means of configuring certain aspects  of the kernel at
run-time, and the  /proc/sys/ directory is there so  that you don't
even need special tools to do it!

In  fact, there are  only four  things needed  to use  these config
facilities:


- a running Linux system
- root access
- common sense (this is especially hard to come by these days)
- knowledge of what all those values mean

Get The Hang

root@debian:~# cd /proc/sys
root@debian:/proc/sys#  grep . kernel/*
kernel/acct:4	2	30
kernel/acpi_video_flags:0
kernel/auto_msgmni:1
kernel/blk_iopoll:1
kernel/bootloader_type:114
kernel/bootloader_version:2
kernel/cad_pid:1
kernel/compat-log:1
kernel/core_pattern:core
kernel/core_pipe_limit:0
kernel/core_uses_pid:0
kernel/ctrl-alt-del:0
kernel/dmesg_restrict:0
kernel/domainname:(none)
kernel/ftrace_dump_on_oops:0
kernel/hostname:debian
kernel/hung_task_check_count:4194304
kernel/hung_task_panic:0
kernel/hung_task_timeout_secs:120
kernel/hung_task_warnings:10
kernel/io_delay_type:0
grep: kernel/keys: Invalid argument
kernel/kptr_restrict:0
kernel/kstack_depth_to_print:12
kernel/max_lock_depth:1024
kernel/modprobe:/sbin/modprobe
kernel/modules_disabled:0
kernel/msgmax:8192
kernel/msgmnb:16384
kernel/msgmni:3893
kernel/ngroups_max:100536
kernel/nmi_watchdog:1
kernel/osrelease:3.1.0-1-amd64
kernel/ostype:Linux
kernel/overflowgid:100534
kernel/overflowuid:100534
kernel/panic:0
kernel/panic_on_io_nmi:0
kernel/panic_on_oops:0
kernel/panic_on_unrecovered_nmi:0
kernel/perf_event_max_sample_rate:100000
kernel/perf_event_mlock_kb:516
kernel/perf_event_paranoid:1
kernel/pid_max:32768
kernel/poweroff_cmd:/sbin/poweroff
kernel/print-fatal-signals:0
kernel/printk:4	4	1	7
kernel/printk_delay:0
kernel/printk_ratelimit:5
kernel/printk_ratelimit_burst:10
grep: kernel/pty: Invalid argument
grep: kernel/random: Invalid argument
kernel/randomize_va_space:2
kernel/real-root-dev:0
kernel/sched_autogroup_enabled:0
kernel/sched_child_runs_first:0
grep: kernel/sched_domain: Invalid argument
kernel/sched_latency_ns:6000000
kernel/sched_migration_cost:500000
kernel/sched_min_granularity_ns:750000
kernel/sched_nr_migrate:32
kernel/sched_rt_period_us:1000000
kernel/sched_rt_runtime_us:950000
kernel/sched_shares_window:10000000
kernel/sched_time_avg:1000
kernel/sched_tunable_scaling:1
kernel/sched_wakeup_granularity_ns:1000000
kernel/sem:250	32000	32	128
kernel/shmall:2097152
kernel/shmmax:33554432
kernel/shmmni:4096
kernel/shm_rmid_forced:0
kernel/softlockup_panic:0
kernel/sysrq:438
kernel/tainted:4097
kernel/threads-max:30982
kernel/timer_migration:1
kernel/unknown_nmi_panic:0
grep: kernel/usermodehelper: Invalid argument
kernel/version:#1 SMP Fri Dec 23 16:37:11 UTC 2011
kernel/watchdog:1
kernel/watchdog_thresh:10
root@debian:/proc/sys#

Copyright © 2009,  2010,  2011,  2012,  2013, 2014     BeautifulWork Project    e-mail:  ahiliation@yahoo.co.in
BeautifulWork Project comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.