Recent Changes - Search:

Softwares

.

LinuxCommand

Main.LinuxCommand History

Hide minor edits - Show changes to output

June 10, 2008, at 06:47 PM by 210.214.41.143 -
Added lines 6-15:
'''Backup to tape drive /dev/st0'''

Following command to backup the /webroot directory and its content to /dev/st0 with 256 blocking factor:

# tar cvf -b 256 /dev/st0 /webroot

-b, --blocking-factor N
use record size of Nx512 bytes (default N=20)
April 26, 2008, at 06:29 AM by 15.219.201.75 -
Added lines 6-15:
'''Using cdrecord'''

# cdrecord -scanbus
# cdrecord -v speed=2 dev=0,0,0 -data cdimage.iso (The CD writer is the device labeled '0,0,0')

'''Making ISO images'''

mkisofs -r -o output_cd_image data_on_HDD (then use cdrecord to write output_cd_image to a CD)
April 09, 2008, at 08:27 PM by 15.219.201.75 -
Added lines 6-9:
'''Finding out the disk usage for a partition or dir du - estimate file space usage'''

du -hm --max-depth 1
Changed lines 3-5 from:
[[Linux Server Monitoring Commands- How do i monitor a Linux Server]]
to:
----
Changed lines 6-7 from:
'''pwck''' -
to:
'''How to Monitor the services that is using up most of the cpu and memory on a server.'''

ps auxfw|sort -nr|grep -v 0.0


[root@wordsworth ~]# ps auxfw|sort -nr|grep -v 0.0
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
linux 613 0.4 3.2 21844 15896 ? S 15:01 0:10 wish /usr/bin/amsn
linux 4085 0.1 1.7 28384 8240 ? S Mar01 13:45 /usr/libexec/wnck-applet --oaf-
linux 32728 1.8 7.5 67216 36196 ? S 14:54 0:50 /usr/lib/opera/9.10-20061214.5/
linux 31458 0.1 1.0 48068 5088 ? Sl 12:26 0:15 xmms -e
linux 30276 0.6 4.4 79656 21488 ? Sl 07:55 3:09 skype
linux 30261 3.0 18.8 221380 90792 ? Sl 07:54 14:15 \_ /home/linux/firefox/firefox-
linux 30099 0.1 4.5 123240 21776 ? Sl 07:25 0:54 \_ /usr/lib/
linux 2285 0.1 2.6 35504 12560 ? S Mar06 3:06 gaim

root@server16 [~]# ps auxfw|grep -vE '0.0|0.1'

[[Linux Server Monitoring Commands- How do i monitor a Linux Server]]

----
'''How verify integrity of password files'''

We can use the command below to verify the integrity of the password file.
Changed lines 54-57 from:

'''grpck'''
to:
----
'''How to verify the integrity of the group file'''
Deleted line 59:
Changed lines 61-62 from:
LVM Related Commands
----
to:
'''How to check information regarding LVM'''
Deleted line 77:
Changed lines 79-83 from:
Stats
-----

%blue%
mpstat
to:

'''How to find processor related stats'''

mpstat
Changed lines 97-98 from:
%blue%vmstat
to:
vmstat
Changed lines 109-114 from:





to:
----
'''How do i display info regarding all TCP/IP sockets in operation currently'''

Use the command netstat

netstat -a
usage: netstat [-veenNcCF] [<Af>] -r netstat {-V|--version|-h|--help}
netstat [-vnNcaeol] [<Socket> ...]
netstat { [-veenNac] -i | [-cnNe] -M | -s }

-r, --route display routing table
-i, --interfaces display interface table
-g, --groups display multicast group memberships
-s, --statistics display networking statistics (like SNMP)
-M, --masquerade display masqueraded connections

-v, --verbose be verbose
-n, --numeric don't resolve names
--numeric-hosts don't resolve host names
--numeric-ports don't resolve port names
--numeric-users don't resolve user names
-N, --symbolic resolve hardware names
-e, --extend display other/more information
-p, --programs display PID/Program name for sockets
-c, --continuous continuous listing

-l, --listening display listening server sockets
-a, --all, --listening display all sockets (default: connected)
-o, --timers display timers
-F, --fib display Forwarding Information Base (default)
-C, --cache display routing cache instead of FIB
----
February 20, 2008, at 06:35 PM by 117.97.17.224 -
Changed lines 2-3 from:
(:Googletext:)
to:
(:Googletxt:)
February 20, 2008, at 06:34 PM by 117.97.17.224 -
Added lines 1-3:
(:Google1:)
(:Googletext:)
Changed lines 12-13 from:
pwck (8) - verify integrity of password files
to:
pwck (8)- verify integrity of password files
Changed lines 38-41 from:
grpck (8) - verify integrity of group files

to:

grpck (8)- verify integrity of group files
Added lines 97-98:
(:Google1:)
(:Googlemmm:)
February 20, 2008, at 06:31 PM by 117.97.17.224 -
Added lines 3-38:
'''Linux Commands'''

'''pwck''' -

shibu@shibu-laptop:~$ apropos pwck

pwck (8) - verify integrity of password files

[@
shibu@shibu-laptop:~$ sudo pwck /etc/passwd
[sudo] password for shibu:
user lp: directory /var/spool/lpd does not exist
user news: directory /var/spool/news does not exist
user uucp: directory /var/spool/uucp does not exist
user www-data: directory /var/www does not exist
user list: directory /var/list does not exist
user irc: directory /var/run/ircd does not exist
user gnats: directory /var/lib/gnats does not exist
user nobody: directory /nonexistent does not exist
user dhcp: directory /nonexistent does not exist
user syslog: directory /home/syslog does not exist
user klog: directory /home/klog does not exist
user hplip: directory /var/run/hplip does not exist
user haldaemon: directory /home/haldaemon does not exist
pwck: no changes
shibu@shibu-laptop:~$
@]


'''grpck'''

shibu@shibu-laptop:~$ apropos grpck
grpck (8) - verify integrity of group files

August 12, 2007, at 04:34 PM by 125.21.38.34 -
Added lines 26-27:
%blue%mpstat
Changed lines 41-42 from:
to:
%blue%vmstat

[linux@wordsworth ~]$ man -k vmstat
vmstat (8) - Report virtual memory statistics
linux@wordsworth ~]$

[linux@wordsworth ~]$ vmstat 2
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
2 0 355084 20888 10736 84396 1 1 37 29 11 13 10 22 67 1
1 0 355084 20936 10736 84396 0 0 0 0 1284 1191 10 42 48 0
3 0 355084 19848 10736 84396 0 0 0 0 1246 1123 9 44 47 0


August 12, 2007, at 04:32 PM by 125.21.38.34 -
Changed lines 31-40 from:
to:
[linux@wordsworth ~]$ mpstat 5
Linux 2.6.9-55.0.2.ELsmp (wordsworth.armialocal.com) 08/12/2007

09:59:51 PM CPU %user %nice %system %iowait %irq %soft %idle intr/s
09:59:56 PM all 18.70 0.10 42.50 0.00 0.10 0.00 38.60 1290.60
10:00:01 PM all 15.30 0.00 41.80 0.00 0.10 0.00 42.80 1276.00
10:00:06 PM all 19.98 0.00 42.36 0.20 0.00 0.00 37.46 1273.35

August 12, 2007, at 04:31 PM by 125.21.38.34 -
Added lines 22-31:
----
Stats
-----

[linux@wordsworth ~]$ man -k mpstat
mpstat (1) - Report processors related statistics
snmpstatus (1) - Retrieves important information from a network entity
[linux@wordsworth ~]$
August 12, 2007, at 11:06 AM by 125.21.38.34 -
Changed line 4 from:
LVM Commands
to:
LVM Related Commands
August 12, 2007, at 11:05 AM by 125.21.38.34 -
Changed lines 1-23 from:
[[Linux Server Monitoring Commands- How do i monitor a Linux Server]]
to:
[[Linux Server Monitoring Commands- How do i monitor a Linux Server]]

----
LVM Commands
----
*resize2fs (8) - ext2/ext3 file system resizer: resize2fs /dev/mynew_vg/vol01
*pvcreate (8) - initialize a disk or partition for use by LVM : pvcreate /dev/sdb1
*pvdisplay (8) - display attributes of a physical volume: pvdisplay
*vgcreate (8) - create a volume group: vgcreate mynew_vg /dev/sdb1 , vgcreate mynew_vg /dev/sdb1 /dev/sdb2
*vgextend (8) - add physical volumes to a volume group : vgextend mynew_vg /dev/sdb2
*lvcreate (8) - create a logical volume in an existing volume group:
*vgdisplay (8) - display attributes of volume groups

* create a logical volume of size 400 MB -L 400 : lvcreate -L 400 -n vol01 mynew_vg
* create a logical volume of size 4 GB -L 4G : lvcreate -L 4000 -n vol02 mynew_vg

*mke2fs (8) - create an ext2/ext3 filesystem
*mke2fs [mkfs] (8) - create an ext2/ext3 filesystem

*mke2fs - create an ext2/ext3 filesystem : mkfs.ext3 /dev/mynew_vg/vol01


March 08, 2007, at 10:12 AM by 210.18.59.46 -
Changed line 1 from:
[[Linux Server Monitorin Commands- How do i monitor a Linux Server]]
to:
[[Linux Server Monitoring Commands- How do i monitor a Linux Server]]
March 08, 2007, at 10:11 AM by 210.18.59.46 -
Added line 1:
[[Linux Server Monitorin Commands- How do i monitor a Linux Server]]
Edit - History - Print - Recent Changes - Search
Page last modified on June 10, 2008, at 06:47 PM