Beruflich Dokumente
Kultur Dokumente
lspv
lspv pvname
migratepv sourcepv destinationpv
migratepv -l lvname sourcepv
destinationpv
chpv -vr pvname
chpv -va pvname
chpv -ay pvname
chpv -an pvname
chpv -hn pvname
chpv -hy pvname
lsvg -l `lsvg -o`
lsvg -p `lsvg -o`
/etc/swapspaces
ping -c 5 ndtv.com
mknode devicename (b-block type/c- char
type) 17(majornumber) 70(minor number)
NOTES:
1. A single interface can have more than one
IP address
2. Configure more than one IP address on a
single interface is calles alias
# lsconf (# prtconf)
location code format for PCI devices
SCSI Adapter can connect maximum 15
devices(SCSI is having the capability to
address max 15 devices)
SCSI ID's will range from 0-16
SCSI ID '7' will not be used,its reserved for the
SCSI device
Each SCSI device will represent 1 device
the entire HARD DISK we will call it as one LUN
(logical unit number)
if we devide the Harddisk into multiple
partitions,each partition is called as LUN
location code format for scsi devices
to
to
to
to
-u /mntpnt
-k /mntpnt
-uk /mntpnt
-uckx /mntpnt
/var/spool/cron/crontabs
/var/adm/cron/log
crontab -e,crontab -l ,crontab -r
at -f filename or path -t
CCYYMMDDhhmm.ss
atq
at noon,at midnight
NFS client
rpcinfo
startsrc -g portmap
startsrc -g nfs
stopsrc -g portmap
stopsrc -g nfs
stopsrc -g portmap
lssrc -g nfs
lssrc -s biod
lssrc -a
/etc/exports
showmount -e
share
showmount -e aix27
exportfs
exportfs -a
export -I /mntpnt
export -u /mntpnt
mount servername or IP:/exportname
/local mount point
mount aix27:/myfs1 /myfs2
crfs -v nfs -d /remote-fs -A yes -a
nodename=aix27 -a options=hard,rw
-m /local
options=hard,rw
options=soft,rw
hard (Cntrl + c will not work),have to
define explicitely options=hard,rw,intr
soft
check=Yes
check=No
/usr (check=false)
mount
2 types of NFS mapping
direct mapping
indirect mapping
nfsd
rpc.mountd
rpc.lockd
rpc.statd
biod (Binary input output daemon (Imp to access data from NFS server)
rpc.statd
rpc.lockd
Reports the status of Remote Procedure Call
used to activate portmap on the NFS server or client
used to activate the nfs services on the NFS server or client
used to in activate ie(in operative) NFS
on the
NFS server
orNFS
client
Portmap
services
on the
server or
client
used to list the NFS services
used to list the subsystem resources
used
the resource
controllers
this istoa list
file all
where
we can keep
mount points,in order to make the
machine as NFS server
To configure a share in NFS server put mount point in /etc/exports
this will show the contents of /etc/exports file
this will show the contents of /etc/exprots file
used to show the contents of specified machine
Exportfs
unexportsand
directories
to NFS
clients.mounts to /etc/exports
To
refreshand
/etc/exports
add newly
configured
file
used to export the file systems
temporary Export ,after reboot this exported mount point will not exist
used to unexport mount points from NFS clients (temporary)
command
usedwill
to mount
file system
frominthe
NFS client
this
command
not create
any stanza
/etc/filesystems
in the NFS
client
this command
is used to are
create
a default
stanza inoptions
the /etc/filesystems
hard
and no interrupt
the
for the NFS client
to
NFS
Server
we can explicitely defince soft option to link betweek NFS client and NFS
server
When the NFS server is not available,and we are trying to access from
the NFS client,it will hang in the middle till NFS server come up to
available state this is called hard mount
When the NFS server is not available,and we are trying to access from
the NFS client,it will not hang in the middle till NFS server come up to
available state this is called soft mount
if check is Yes means,at the time of reboot ,fsck -y will applies to mount
point
if check is no means,at the time of reboot,fsck -n will not applies to
mount point
fsck -y command usually we will run when the file system is in the
unmount state
But at the time of reboot this /usr directory will be automatically
mounted,so its not recommended to apply fsck when f.s is mounted
by using only mount command we can see the nodename and options of
NFS along with other f.s details
create a file system in server A and keep the file system in /etc/exports
in server B ,create 2 file's ie /etc/map( /prasad
and /etc/auto_master (/- /etc/map)
then run the # automount -v
server A:/mntpnt )
tht means with out creating prasad directory,we can specify as per above
and mount the Server A mount point
when login into user ,have to mount automatically (home/username)
to create object
vi prasad1
student:
name="prasad"
calss="mca"
rno=24
evices information
ODM Object
odmadd
odmdelete
odmchange
odmget
short rno;
};
/*
descriptors: 3
structure size:
0x2c (44) bytes
data offset: 0x20003014
population:
1 objects (1 active, 0 deleted)
*/
aix27:root:/:# odmget -q rno=24 student
student:
name = "prasad"
class = "mca"
rno = 24
aix27:root:/:# odmchange -o student -q rno=24 /prasad2
aix27:root:/:# odmget student
student:
name = "prasad"
class = "mca"
rno = 30
aix27:root:/:#
aix27:root:/:# odmget student
student:
name = "prasad"
class = "mca"
rno = 30
add second object to the class from /prasad2
aix27:root:/:# odmadd /prasad2
aix27:root:/:# odmget student
student:
name = "prasad"
class = "mca"
rno = 30
student:
name = "prasad"
class = "mca"
rno = 30
passwordless authentication is used to define the user to login to remote machine with out issuing an
assume tht server A is having root user and this root user of server A wnt to login into the SERVER B w
password
to carry out this scenario,in SERVER B (/etc/hosts.equiv) file we need to define (root user of SERVER A)
follows
SERVER B
/etc/hosts.equiv (file contais a list of trusted hosts)it is used by the rsh,rlogin and rcp commands
SERVER A root
or
SERVER A
or
username
we need to define the user as above to carry out the password less authentication
we can also define as trusted user by login into the normal user
vi rhosts
host1
name of a host considered trusted by the local system individual user on the trusted host tht can login
password,if no users are specified then all users on the trusted host can login with out a password
inetd listens on designated ports used by internet services such as FTP, POP3, and telnet. When a TCP
packet arrives with a particular destination port number, inetd launches the appropriate server progra
the connection. For services that are not expected to run with high loads, this method uses memory m
since the specific servers run only when needed. Furthermore, no network code is required in the appl
daemons, as inetd hooks the sockets directly to stdin, stdout and stderr of the spawned process. For p
have frequent traffic, such as HTTP and POP3, a dedicated server that intercepts the traffic directly ma
preferable.
The file /etc/services is used to map port numbers and protocols to service names, and the file /etc/inet
map service names to server names. For example, if a TCP request comes in on port 23, /etc/services s
telnet
23/tcp
The corresponding line in the /etc/inetd.conf file is
telnet
stream
tcp6
nowait
root
wait/nowait
/usr/sbin/telnetd
user
server prg
telnetd -a
arguments
This tells inetd to launch the program /usr/sbin/telnetd with the command line arguments telnetd -a. ine
automatically hooks the socket to stdin, stdout, and stderr of the server program.
/etc/services
ftp portnumber 21
telnet portnumber 23
rlogin
ssh
rsh
by using following command we can start or stop inetd.conf
# startsrc inetd
#stopsrc inetd
#refresh -s inetd
#netstat -an (comd used to see port listening or not)
RUN LEVELS
run levels are ranging from 0 to 9
and h
and a,b,c
respawn
boot
the command to find out the system run level
is
who -r
cat /etc/.init.state
the default run level for the system is 2
init 1
init 2
telinit q
telinit m
run the program once(dont wait for the 1st program till its
completion) and goto next program
wait till the program get executed and execute the next
program
assume in one run level 2 pgrms called prgm1 and prgm2 are
running,the prgm1 is infinite loop,when we run this run
level,the prgm1 will be run continuously and prgm2 is normal
pgm used to display 5 numbers,due to any reasons the prgm1
is killed means,it will be stated automatically
only at the time of boot this run level will be executed
aix27:root:/:# init 0
INIT: New run level: 0 (ENTER)
aix27:root:/:#
aix27:root:/:# init 1
INIT: New run level: 1 (ENTER)
aix27:root:/:#
aix27:root:/:# init 2
INIT: New run level: 2 (ENTER)
aix27:root:/:#
used to tell the /etc/inittab file to check for the new entries and
run those new entries(traverse once and run those new entries)
used to bring the system into maintanance mode ie single user
mode
CORE file
errpt
/usr/lib/errdemon
/usr/lib/errdemon
/usr/lib/errstop
errclear 0
errprt -a
errpt - i /tmp/errpt_backup
errpt -d H
errpt -d S
errclear -d H 0
errpt -c > /dev/console
errpt -a -c > /dev/console
errpt -j identifier
errlogger "test msg to be record"
errpt -d S -T TEMP
errpt -s MMDDhhmmYY -e MMDDhhmmYY
aix27:root:/:# /usr/lib/errdemon -l
Error Log Attributes
-------------------------------------------Log File
/var/adm/ras/errlog
Log Size
73728 bytes
Memory Buffer Size
32768 bytes
Duplicate Removal
false
Duplicate Interval
10000 milliseconds
Duplicate Error Maximum 1000
by using the following command we can
change the above errdemon attributes
/usr/lib/errdemon - I /tmp/messages
/usr/lib/errdemon -s 2097152
/usr/lib/errdemon -B 2097152
/usr/lib/errdemon -d
/usr/lib/errdemon -D
/usr/lib/errdemon -t 20000
/usr/lib/errdemon -m 2000
NOTE:
When /var/adm/ras/errlog gets
corrupted ,the work around is to remove
the file and start and stop te error
demon,doing this will recreate the
errorlog file,do not nullify errorlog file.
When ever any program failed ,tht failed information will be kept in this
file
is a command used to get the error related information from
/var/adm/ras/errlog
this errdemon is used to track the errors,when ever any error occurs this
will put all those errors in the /var/adm/ras/errlog
used to start the error demon
used to stop the error demon
used to clear all recorded errors in the /var/adm/ras/errlog
used to see the detailed report of errlog
if errlog type file is stored in some other location,by using this command
we can explore those contents
used to diplay only H/W errors
used to display only S/W errors
this will clear only H/W related errors
errlog wil be redirected to console
detailed errorlog report will be redirected to console
used to display the errors by identifier wise
by using errlogger command we can record our own error messages to
the errlog
used to display the (d for class) software type and (T for type) and TEMP
type error messages
used to display the errors from and to date
this is not recommended to nullify the errlog file.its better to remove the
full file,and start/stop the errdemon to recreate the errlog file.
dump
the contents of real memory will be copied
into logical volume ie paging space
at the time of reboot the /dev/hd6 contents
will be moved to /var/adm/ras/vmcore.0 file
the default system dump device is /dev/hd6
if there is no enough space in /dev/hd6
means,the dump will not occur
to find out how much size is required for
both /dev/hd6 and /var/adm/ras directory the
following command is used
sysdumpdev -e
the default sysdumpdev attributes can be get
by using the following command
aix27:root:/:# sysdumpdev -l
primary
/dev/hd6
secondary
/dev/sysdumpnull
copy directory
/var/adm/ras
forced copy flag
FALSE
always allow dump FALSE
dump compression
ON
the above attributes can be changed by using
following commands
sysdumpdev -Pp /dev/aix27dumpdev
sysdumpdev -Pps/dev/aix27dumpdev
sysdumpdev -p /dev/aix27dumpdev
sysdumpdev -s /dev/aix27dumpdev
sysdumpdev -d /tmp/dumpdir
dump compression (ON /OFF)
sysdumpdev -c
sysdumpdev -C
sysdumpdev -K
ctrl + alt + 1
ctrl + alt + 2
alog -t console -o
/dev/hd6 ---> /var/adm/ras
Off
ON
to take the system dump manually
primary dump device
secondary dump device
Backup's
rootvg
# mksysb -ie /dev/rmt0
# mksysb -i /backup/rootvg.bkup
/image.data
# mkszfile
# lsmksysb -lf /dev/rmt0
l - list vg information only ,f - device or file)
# lsmksysb -f /mksysb/sep_042011
# lsmksysb -lf /mksysb/sep_042011
# lsmksysb -Lf /mksysb/sep_042011
backup Command
backup -I -v -q -f /dev/rmt0