commands

 

# pkgadd -d /cdrom/cdrom0/s0/Solaris_2.5 -s /var/spool/pkg SUNWaudio SUNWabe
# pkgchk -v SUNWaudio == where the files extracted
# pkginfo SUNWzip -- Information about package

How to Add a Package to a Diskless Client’s Root File System
# pkgadd -R rootpath -d device-name pkgid


 

# pkgrm SUNWzip -- Removing the package
# pkgchk -l -p /usr/bin/showrev -- to find the package by using file name


#useradd -d /export/home/user1 -m -g other -u 1050 user1
This command creates the user1 user account, assigns it UID 1050, makes it a member of group other and creates its home directory /export/home/user1.


Mirroring
A mirror can consist of up to four submirrors



#export DISPLAY=”CLIENT-BOX-IP:0.0”

#echo $DISPLAY

Xhost +<CLIENT-BOX-IP>

Use Xmanager – xstart

~SSH as protocol.

~Shell – xterm(Solaris)



To use the GUI form of the installer program, set the display environment on your administrative console. In this example, we are using csh:

local host : 128.100.2.16
remote host:17.200.10.5

Step 1. On the local host

Type the following at the command line:


#xhost + 17.200.10.5

Step 2. Log on to the remote host

#ssh root@17.200.10.5
#setenv DISPLAY 128.100.2.16:0.0 (Remote host)

Step 4. Now you can run software from the remote host.

E.g.: when you type % xterm on the remote host, you should see an xterm window on the local host.

Step 5. After You Finish

You should remove the remote host from your access control list as follows. On the local host type:
# xhost - 17.200.10.5

myconsole# xhost +
myconsole# setenv display myconsole:0.0


http://www.datadisk.co.uk/html_docs/veritas/veritas_netbackup_cs.htm


 

bash-2.05# /usr/openv/volmgr/bin/sgscan tape -v
/dev/sg/c2t1l0: (/dev/rmt/1): "SEAGATE ULTRIUM06242-XXX1613"

/usr/openv/volmgr/bin/vmoprcmd -up 0 -- drive up

./bpimagelist -A -media -d 03/03/08 00:00:00 -e 03/09/08 23:00:00 | more
./bpimmedia -U -d 03/03/08 00:00:00 -e 03/09/08 23:00:00

http://seer.entsupport.symantec.com/docs/247902.htm -- reports

vmupdate -rt tld -rn -rh gejpfd1 -h gejpfd1 -use_barcode_rules -empty_id
/usr/openv/volmgr/bin/vmcheckxxx -rt tld -rn 0 -rh gejpfd1 -- list the medialist
/usr/openv/volmgr/bin/vmoprcmd -d - dirve status
/usr/openv/volmgr/bin/tpconfig -d


http://www.backupcentral.com/components/com_mambowiki/index.php/Category:NetBackup_Administrative_Tasks


http://searchdatabackup.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid187_gci1300558,00.html

The bpexpdate command controls the expiration of backup images among other things. However, it does not actually remove the image from the media. The command removes database (catalog) entries or reference to a backup image or media ID. The bplabel with –erase and –l (long erase) options will erase the media.



/usr/openv/netbackup/bin/admincmd/bpmedialist -U -mlist == to get media list
http://www.bettssoftware.com/docs/tips-netbackup.html == NetBackup Good One
http://www.sun.com/bigadmin/content/submitted/restore_netbackup.html - Restoring solaris os from netbackup
http://seer.support.veritas.com/docs/183145.htm --command line reports/status
https://forums.symantec.com/syment/board/message?board.id=21&message.id=19967#M19967


History with Timestamp...
#export HISTTIMEFORMAT='%a %T '
#echo "export HISTTIMEFORMAT='%a %T '" >> /root/.bashrc

mount -o loop -t iso9660 -r cd_image.iso /mnt/cdrom

To start /adm/messages service
bash-2.05# /etc/init.d/syslog stop
bash-2.05# /etc/init.d/syslog start

Solaris Sendmail path - /usr/lib/sendmail
Clear the Que - /usr/lib/sendmail -q -v

http://www.basicallytech.com/blog/index.php?/archives/95-Solaris-NIS-installation-and-configuration.html

RPM Query Options...
1.To find out which package owns a file
#rpm -qf /usr/bin/panda
panda-2.0-1

2. To find all the files/path related to RPM
#rpm -ql hotrod-1.0-1.i386.rpm

2.To learn about a package before installing it
#rpm -qip hotrod-1.0-1.i386.rpm

3.Finally, here's an advanced form of the query command that will tell you which packages are taking up the most room:
#rpm -qa -queryformat='%{SIZE} %{NAME}' | sort -n


http://www.oracle-base.com/articles/10g/OracleDB10gR2RACInstallationOnCentos4UsingVMware.php#vmware_server_installation



Here is the procedure for enabling VNC session,

If you are enabling for root

  1. Login as root
  2. Type "vncserver"
  3. Enter the password
  4. Edit ".vnc/xstartup"
  5. comment all the line and add "gnome-session &" at the end.

When you enter the password it will create a session with name as Ex:cretojpppdxdb1.comfin.ge.com:1 which will be the servername for VNC.

To kill the VNC session, need to check with

#vncserver -kill :1


Changing timeZone

  1. Logged in as root, check which timezone your machine is currently using by executing `date`.
  2. You'll see something like Mon 17 Jan 2005 12:15:08 PM PST, PST in this case is the current timezone.
  3. Change to the directory /usr/share/zoneinfo here you will find a list of time zone regions.
  4. Choose the most appropriate region, if you live in Canada or the US this directory is the "America" directory.
  5. If you wish, backup the previous timezone configuration by copying it to a different location. Such as

#mv /etc/localtime /etc/localtime-old
6.Create a symbolic link from the appropiate timezone to /etc/localtime. Example:
#ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
7.If you have the utility rdate, update the current system time by executing
/usr/bin/rdate -s time.nist.gov
Set the ZONE entry in the file /etc/sysconfig/clock file (e.g. "America/Los_Angeles")
Set the hardware clock by executing:
/sbin/hwclock --systohc



http://www.linuxjournal.com/article/4445 - Automatic start scripts
chkconfig --add apache2
chkconfig --del sendmail
find /etc/rc.d -name '*apache2' -exec file {} \;
find /etc/rc.d -name '*apache2' -print
If you use - chkconfig --levels 2 sendmail off - The script under /etc/rc.d/rc2.d/ changed from S50sendmail to K50sendmail


Solaris
At a csh(1) command prompt, enter the command /usr/sbin/arp `hostname`. You will see a screen like this:

% /usr/sbin/arp `hostname`
hammahamma (128.95.1.115) at 8:0:20:22:e2:be permanent published
The MAC address of this host is 08:00:20:22:e2:be.



mount -o tcp 3.159.17.230:/vol/vol0 /dummy/
mount -o rw,rsize=32768,wsize=32768,hard,tcp,vers=3 3.159.214.230:/vol/datavol /foldersdata_6
http://www.digitalissues.co.uk/html/os/unix/solaris.html

lpadmin -p CRE001 -s 3.246.20.28
lpstat -p ZINC -l
lpstat -t

lpstat -p all ==working/connected printers
/var/lp/logs/     

By echoing the new hostname into /proc/sys/kernel hostname file. Using this method I was able to change the hostname without rebooting my RHEL5 machine

http://sysdigg.blogspot.com/2008/01/how-to-change-hostname-in-linux.html - Changing hostname
http://groups.google.com/group/OSUG-Indonesia/browse_thread/thread/e160248ea0f3116d - network related commands
http://www.webservertalk.com/archive101-2005-6-1074230.html = reduce the last information

f ps -fu pat === -u -->user pat



Have you ever found yourself in this position: you notice that /var/log/messages (or some other syslog-owned file) has grown too big, and you

rm /var/log/messages
touch /var/log/messages

to reclaim the space, but the used space doesn't reappear? This is because, although you've deleted the filename part, there's a process that's got the data part open still (syslogd), and the OS won't release the space for the data until the process closes it. In order to complete your space reclamation, you have to

kill -SIGHUP `cat /var/run/syslogd.pid`

to get syslogd to close and reopen the file.


usermod example - Add a existing user to existing group
Add existing user tony to ftp supplementary/secondary group with usermod command using -a option ~ i.e. add the user to the supplemental group(s). Use only with -G option :
# usermod -a -G ftp tonyChange existing user tony primary group to www:
# usermod -g www tony


export CLASSPATH=$CLASSPATH:/usr/java/j2sdk1.4.2_12/lib/tools.jar:/usr/java/j2sdk1.4.2_12/lib/dt.jar:./


chkconfig --add jboss === adding new service to checkconfig list


hpasm - browser login serverip:2381


bash-2.05# /usr/local/bin/gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)
bash-2.05#


Adding a New Attached Printer With LP Commands
# chown lp /dev/term/b     
# chmod 600 /dev/term/b


# lpadmin -p luna -v /dev/term/b


# lpadmin -p luna -T PS


# lpadmin -p luna -I postscript


# cd /etc/lp/fd
# for filter in *.fd;do
> name=`basename $filter .fd`
> lpfilter -f $name -F $filter
> done


# accept luna


# enable luna     


# lpadmin -p luna -D "Room 1954 ps"


# lpstat -p luna


     printer luna is idle. enabled since Jul 12 11:17 1999. available.


lpadmin -p lipi -v /dev/null -m netstandard -o dest=100.95.206.6:9100 -o protocol=tcp -T PS -I postscript



# lpadmin -p laser -v /dev/null
Create a printer named laser and associate it with the device /dev/null.

# lpadmin -p laser -D "LaserJet 4ML"
Set the description of the printer.

# lpadmin -p laser -i /usr/lib/lp/model/netstandard
Set the interface program for the printer to the standard script for network printers.

# lpadmin -p laser -o dest=ps313620:l1 -o protocol=bsd -o timeout=5 -o nobanner
set the network destination for the printer. This address ps313620:l1 is made up of two parts: ps313620 is the host name of the print server on my network (in this case it is the factory default name for the print server), and l1 refers to the parallel port on the server. The PS105 only has one port, but other models have more.
The nobanner option gives the user the chance to leave off the banner page, but the default is still to print them!

# lpadmin -p laser -I postscript -T PS
Set the content type to postscript, and the printer type to PS.

# cd /etc/lp/fd
# for filter in *.fd
> do
> name=`basename $filter .fd`
> lpfilter -f $name -F $filter
> done
This sets up all available printer filters. This isn't specific to the printer just added, so it only ever needs to be done once.

# vi /etc/lp/interfaces/laser
Change the line that reads nobanner=no to nobanner=yes
This disabled banner pages on the printer. On a home network where the printer is a few feet away, these just waste paper.

# accept laser
Allow queuing of requests to this printer.

# /usr/bin/enable laser
Allow the printer to print queued requests.


respwan - to start/restart the services if any one stop
telinit: The command "telinit q" causes init to reread /etc/inittab
Z - defunct or zombie (a process with no swappable image but a structure in memory)
Virtual Memory (VM) = Physical RAM + Swap space
http://www.uwsg.iu.edu/UAU/memory/pageswap.html



route add default gw gw-address
route del -net default



telinit 3 === want to switch to runlevel 3
you must tell init about the change and cause it to re-read the file. Some people use kill -HUP 1 to tell init to do this
# kill -HUP 1


# groupmod -g 600 mygrp -- Change the mygrp Group ID to 600.
# groupmod -n mygrp1 mygrp -- Change the mygrp name to mygrp1



useradd -c "test account" -d /home/sss -g(Primary group) sss -G(Secondary Group) mercury -s /bin/sh sss

rpm -qa --qf "%{n}-%{arch}\n" ==== shows the RPM architecture

# hdparm -I /dev/sda - To check the harddisk information.

http://www.oracle.com/technology/pub/articles/dulaney_awk.html - awk how to
http://www.howtoforge.com/sysstat_monitoring_centos - sysstat how to


# metadb -a -f –c4 c1t0d0s7 == Database creation
# metainit d13 1 1 c1t0d0s3 - primary slice creation
# metainit d23 1 1 c1t1d0s3 - secondary slice creation
# metainit d3 -m d13 - Adding slice d13 to mirror d3
# edit the /etc/vfstab
/dev/dsk/c1t0d0s3 /dev/rdsk/c1t0d0s3 - - /fd100
Should be changed
/dev/md/dsk/d3 /dev/md/rdsk/d3 - - /fd100
#metattach d3 d23 - Adding secondary slice d23 to mirror d3



For root mirroring use following two commands
# metaroot d0 = instead of manually editing the /etc/vfstab
# lockfs –fa = lock the filesystem before rebooting.


When you are executing from your home directory your cshrc or .profile and .kshrc is sourced which is setting alias for rm as /usr/bin/rm -i
Alias takes precedence over the path variable.
When you do /usr/bin/rm you are bypassing the alias and executing the actual command



http://www.sunmanagers.org/pipermail/summaries/2004-January/004803.html -- password recovery

http://docs.sun.com/app/docs/prod/v445.srvr~v445#hic
http://www.eng.auburn.edu/~doug/howtos/multipathing.html === Multipathing



platform/sun4u/kernel/drv/bge.conf
link_duplex: 0 is down, 1 is half-duplex, 2 is full-duplex
http://www.brandonhutchinson.com/Solaris_NIC_speed_and_duplex_settings.html == setting full duplex
ndd -get /dev/hme link_mode == to get the mode(dulplex) status
ndd -get /dev/hme link_speed == speed status


route delete default 192.168.11.254
route add default 192.168.11.2
Solaris ifconfig



ifconfig bge1 inet unplumb
ifconfig e1000g0 plumb inet ip-address netmask ip-netmask .... up

ifconfig bge2 plumb inet 3.246.24.71 netmask 255.255.255.224 broadcast 3.246.24.95 up


http://www.abxzone.com/forums/f22/solaris-9-intel-csa-lan-66494.html#post681898 == NIC config
The login Command
Edit /etc/default/login file
CONSOLE=/dev/console == When this line is commented out, the root account can log directly into the system
over the network via telnet in addition to the console. This is not secure and should be avoided.

CONSOLE=/dev/ttya root only cann access thru serial device



The rlogin and rsh services use inadequate authentication for security and should be replaced with an SSH protocol system such as ssh or OpenSSH. Comment out the following lines in /etc/pam.conf

#rlogin auth sufficient /usr/lib/security/pam_rhosts_auth.so.1
#rsh auth required /usr/lib/security/pam_rhosts_auth.so.1
If you disable the PAM configuration for rlogin and rsh services, also remove them from the /etc/inet/inetd.conf file
To disable a service, edit the /etc/inetd.conf file and place a comment character (“#”) in front of the line
containing the service definition. Once this is completed, send a HUP signal to the inetd process. This will cause it to reread its configuration file.


intetd.conf



in.tnamed – supports the DARPA Name Server Protocol. This daemon shouldbe disabled.
in.uucpd – supports UUCP connections over networks. This service should be disabled unless UUCP is used.
in.fingerd – provides information on local system accounts. This service should be disabled unless needed.
systat – provides anyone connecting to the system with the output of ps -ef. This service should be disabled because it provides too much system information.
netstat – provides a list of current network connections via the output of the netstat command. This service should be disabled because it provides system information which can be used to launch attacks against the system.
time – prints out the current time and date.
echo – echoes back the incoming data stream. This service should be disabled.
discard – discards the incoming data stream. This service should be disabled.
chargen – generates a continuous stream of characters. This service should be disabled.

For restricted access servers, all connections to services managed by inetd should be logged. This can be done by adding an additional option to the startup of inetd in /etc/rc2.d/S72inetsvc. By adding a -t option, the inetd daemon logs the
IP address of all systems requesting inetd based services. The IP addresses are logged through the syslog service.


 

The daemons and services that use RPC on a Solaris OE system include the following.

/etc/inetd.conf:
*testsvc * kcms.server *sadmind * ufsd *rquotad *cachefsd *rpc.rusersd *kerbd *rpc.sprayd *xaudio *rpc.rwalld *rpc.cmsd *rpc.rstatd *rpc.ttdbserver

/etc/rc2.d/S71rpc:
*rpcbind *nis_cachemgr *keyserv *rpc.nispasswddn *rpc.nisd *rpc.rexd

/etc/rc3.d/S15nfs.server:
*rpc.bootparamd



System Log Messages
----
/var/adm/messages -- majority of the system messages
/var/log/syslog     -- mail system messages
/var/log/authlog -- important authentication log messages

Uncomment the following line in /etc/syslog.conf
#auth.notice ifdef(`LOGHOST’, /var/log/authlog, @loghost)
Save the file and use the following command to force syslogd to re-read its configuration file:
# kill -HUP `cat /etc/syslog.pid`
OR
# pkill -HUP syslogd



Application Log Files
/var/adm/sulog     messages from           /usr/bin/su
/var/adm/vold.log      messages from           /usr/sbin/vold
/var/adm/wtmpx      user information from      /usr/bin/login
/var/cron/log      messages from           /usr/sbin/cron

/var/adm/wtmpx file should be viewed with the last command



/etc/issue == To display warning messages for FTP/TELNET
/etc/motd -- Message of the day



The run level directories contain the scripts for starting or stopping services for the system run level. The system run level directories and their purpose are listed here:
Default Solaris Run Level

S : Single user state (useful for recovery)
0 : Access Sun Firmware ( ok> prompt)

  1. : System administrator mode
  2. : Multi-user w/o NFS
  3. : Multi-user with NFS
  4. : Unused
  5. : Completely shutdown the host (like performing a power-off @ OBP) [ thanks to Marco ]
  6. : Reboot but depend upon initdefault entry in /etc/inittab


Use the passmgmt command to delete accounts in /etc/passwd and /etc/shadow.
Here is an example:
# passmgmt -d smtp
This command removes the /etc/passwd and /etc/shadow entries for smtp

Use the -l option of the passwd command to lock accounts. To lock the uucp account use the following command:
# passwd -l uucp
Also, use the -e option to the passwd command or edit the /etc/passwd file manually to change the default shell for those accounts to /usr/bin/true. For

# passwd -e uucp
Old shell: /sbin/sh
New shell: /usr/bin/true


http://www.informit.com/articles/article.aspx?p=24112&rl=1 - Security checklist



http://ist.uwaterloo.ca/security/howto/2000-09-19/baseline.html
#Netstat -a
Network services are either TCP or UDP based. In the "netstat -a" output look for TCP services in a "LISTEN" state and UDP services in an "Idle" state to determine the services that your system offers to the world

TCP service with the "ftp" name (also port 21) in a "LISTEN" state -- it's waiting for a client to connect and the two processes will then start talking to one another. There's also a UDP service at the "name" service (also port 42) in an "Idle" state -- it's waiting for clients to send it messages (to which it will respond). The mapping of service names -- like ftp, name, telnet, smtp, etc. -- to their corresponding number is tabled in the file /etc/services.


Openboot-Details....OK prompt
#show-disks
#printenv
#devalias
#setenv "boot-device" boot
http://www.examcram2.com/articles/article.asp?p=440286&seqNum=16&rl=1
http://www.adminschoice.com/docs/open_boot.htm
command : nvalias "boot disk name" "hardware path"
#nvalias disk2 /pci@1e,600000/pci@0/pci@2/scsi@0/disk@0,0


Executed command #hwclock --hctosys
Added the above command to /etc/rc.locall to make it permanent.
Executed command #hwclock -r ; date - found time to be in sync.


Add the following line in /etc/sysconfig/network-scripts/ifconfig-eth0 & /etc/sysconfig/network-scripts/ifconfig-eth2
ETHTOOL_OPTS="autoneg off speed 100 duplex full"


http://www.linuxhacks.org/tips.php - linux tips



For Solaris 9:

# /etc/init.d/sshd stop ; /etc/init.d/sshd start



Configure the server
Open up /etc/ssh/sshd_config and find the ClientAliveInterval option (if it’s not there, add it). The value is in seconds, so I went with 540 seconds, or 9 minutes.

ClientAliveInterval 540
Configure the client
Edit /etc/ssh/ssh_config and find the ServerAliveInterval option (if it’s not there, add it). Again, this value is in seconds, so a 9-minute interval is 540 seconds.

ServerAliveInterval 540


http://www.linuxtroubleshooting.com/wiki/index.php?title=Main_Page
ps -eo pid,%cpu,vsz,args,wchan


hpasmcli -s "show server = will show the hardware status


Solaris Commands


consolehistory -v
showenvironment -v
showlogs -v
showplatform -v
showsc -v
showfru



Solaris Crashdump analysis
# dumpadm
Dump content: kernel pages
Dump device: /dev/dsk/c0t0d0s3 (swap)
Savecore directory: /var/crash/testbox
Savecore enabled: yes

What To Do In Case of a Crash?

  1. scan /var/adm/messages for any warnings or errors
  2. check /var/crash/`uname -n` for a crash dump
  3. If one is not present, confirm that savecore is enabled. Try running savecore -v if it was not previously enabled. It would also be a good idea to run prtdiag at this time to determine if there are any egregious hardware faults
  4. Use the following steps to generate the ACT analysis of that core file to send to Sun:

Create a temporary upload directory. This directory will hold the output of these programs and will eventually be uploaded to Sun.

# mkdir /tmp/upload
# cd /var/crash/`uname -n`
# /opt/CTEact/bin/act -n unix.0 -d vmcore.0 > /tmp/upload/act_out

5. Install (if necessary) and run the explorer script as follows:
# ./explorer

6. The explorer script will prompt you for some information. Do not select email output. The script will create both a subdirectory and a uuencoded file containing the system audit. Copy the uuencoded system audit output to the /tmp/upload directory. For example:
# cp explorer.80b0c1cc.uu /tmp/upload

7. Tar and compress the output for upload to Sun:
# cd /tmp
# mv upload 123456
# tar -cvf 123456.tar 123456
# gzip 123456.tar

8. Finally, FTP the output to Sun:
# ftp sunsolve.sun.com
ftp> username: ftp
ftp> password:
ftp> bin
ftp> put 123456.tar.gz
ftp> quit

9. At this point you can remove the temporary upload directory:
# /bin/rm -rf /tmp/123456

Retain the original core files in /var/crash/`uname -n` until the case is closed. Once the case is closed by Sun, remove these file to free up disk space


Reading utmp and wtmp
/usr/bin/last converts /var/adm/wtmpx to readable data. cat /var/adm/utmp | /usr/lib/acct/fwtmp > /tmp/utmp.ascii can be used to make utmp readable.


# modinfo -- Currently loaded modules


At ok Prompt



banner -- for additional info
reset-- run hardware diagnostics and reboot
probe-scsi-all --look for attached SCSI devices
printenv --all bootflags
setenv <bootflag> <value> e.g. setenv auto-boot? False

A hanging system



If the system is hanging or you are trying to crash it, be sure to sync the system before rebooting. This way, you have a chance of getting a core dump as the system comes back up.
>ok sync

After reboot, if you don't have enough room in /var/crash (and, really, you should have a /var/crash which is larger than physical memory), you can attempt a manual savecore to another area.
e.g.

# cd /spare
# savecore -d .


/usr/platform/<architecture>/sbin/prtdiag -v


installboot /usr/platform/<architecture>/lib/fs/ufs/bootblk /dev/rdsk/c?t?d?s?


Activating the md.tab


prtconf -pv


Check the files are using by a process - #fuser -c <mountpoint> - ex #fuser -c /fd100
Confirm the status #lsof +D /mount_point
Force umount = #umount -f /usr


http://www.blacksheepnetworks.com/security/resources/disksuite-step-by-step.html
#/opt/Sunexpl../explorer -q


#cat /etc/init



#gpasswd -d <user> <group> - remove
#gpasswd -a <user> <group> -add


#kill -9 PID - If kill comand not work then use -9


grep find locate which whereis - search commands


find <path> -name <filename>
info


Changing environment or By editing the /etc/profile ==== For all users



#export PATH=$PATH:<newpath>
example : #export PATH=$PATH:/usr/sbin
#export PATH=$PATH:/usr/openwin/bin:/usr/ucb:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/ccs/bin:/usr/local/bb

#env
PATH
---
boot.log


#fuser -u /dev/dsk/c0t0d0s1 - show the files used in this device
#fuser -k /dev/dsk/c0t0d0s1 - will kill all the used process



'SPARC - Scalable Process Architecture

http://www.meinberg.de/english/info/ntp.htm
NTP Config - For correct synchronization, the delay and offset values should be non-zero and the jitter value should be under 100
1. Change in OUR TIMESERVERS
time.comfin.ge.com
2. NTP MULTICASTCLIENT
restrict time.comfin.ge.com mask 255.255.255.255 nomodify notrap noquery
3. chkconfig ntpd on
4. service ntpd start
5. service ntpd stop

NTP uses some pseudo IP addresses to specifiy special reference time sources.

For example, NTP uses a pseudo IP address 127.127.8.n to access a Meinberg radio clock installed at the local computer. To access its own system clock, also called the local clock, NTP uses the pseudo IP address 127.127.1.0. This IP address must not be mixed up with 127.0.0.1, which is the IP of the localhost, i.e. the computer's loopback interface

Additionally, there should be an entry for the local clock which can be used as a fallback resource if no other time source is available. Since the local clock is not very accurate, it should be fudged to a low stratum:
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 12




find /tmp -size +20000 -print -exec du -k {} \ - find the details
http://www.zazzybob.com/3510.html - Adding storage configuration
SUNWsccli - Show the SAN Details

# shutdown -i<init-state> -g<grace-period> -y


#hplog
http://gentoo-wiki.com/HOWTO_Use_Hpasm
HPASM (HP Advanced Server Management)



Usage
Show Arguments

hpasmcli -s "show"

Will give you a complete list of things you can check

SHOW ASR
SHOW BOOT
SHOW DIMM
SHOW F1
SHOW FANS
SHOW HT
SHOW IML
SHOW IPL
SHOW NAME
SHOW POWERSUPPLY
SHOW PXE
SHOW SERIAL [ BIOS | EMBEDDED | VIRTUAL ]
SHOW SERVER
SHOW TEMP
SHOW UID
SHOW WOL

Check Fans

So you can see from the previous command to check the fans you would use this command.

hpasmcli -s "show fans"

Check DIMMS

So you can see from the previous command to check the DIMMs you would use this command.

hpasmcli -s "show dimm"

Check Powersupply

I think you get the picture now

hpasmcli -s "show powersupply"



You may not be able to view the job by using
crontab -l

command

I think this is the system activity accounting job, a genuine process,
that usually runs ever 10 minutes.

See this file
/etc/cron.d/sysstat



free(1) Displays free and used memory statistics.
top(1) Displays CPU utilization and process-level statistics.
watch(1) Periodically executes the specified program, displaying fullscreen output.
vmstat(8) Displays a concise overview of process, memory, swap, I/O, system, and CPU utilization.
iostat(1) Displays CPU and I/O statistics.
mpstat(1) Displays individual CPU statistics on multiprocessor systems.
sadc(8) Collects system utilization data.
sa1(8) A script that runs sadc periodically.
sar(1) Produces system resource utilization reports.
sa2(8) Produces daily system resource utilization report files.
nice(1) Changes process scheduling priority.


#ps -eo pcpu,pid,user,args | sort -r -k1 | less
#ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10
#mpstat -P ALL ==status of CPU
#sar -f <filesname>



#sar -r -f <filename> | more == memory details


 

IDE & SCSI

SCSI
C = controller no.
T = Target ID ( or Disk ID)
D = Disk (always 0 coz you can put only one disk in each target)
S = slice

IDE
C = controller no.
T = Target ID
D = Disk (always 0 coz you can put only one disk in each target)
S = slice

Target ID
Primary master = t0
Primary slave = t1
Secondary master = t2
Secondary slave = t3



Accessing pacct file


# lastcomm -f /var/account/pacct.1 | grep "Jun 26" | grep pts | grep -v F | grep -v -e id -e grep -e egrep -e hostname -e dircolors -e consoletype -e mktemp -e locale -e gtbl -e groff -e troff -e grotty


http://www.ibm.com/developerworks/systems/library/es-networkinstall/index.html?ca=dgr-lnxw16LinuxNFSInstall == NFS install


#date -s "MM/DD/YYYY hh:mm:ss"
#hwclock --systohc



http://forum.java.sun.com/thread.jspa?messageID=9246198 == #iostat -E -- Hard errors: 1

/etc/sysconfig/network/devices
/etc/modules.conf
/etc/modules.conf~
lsmod ==< list modules
insmod <Modules.name>



5.1 Bonding Configuration
Each bonding device has a read-only file residing in the /proc/net/bonding directory. The file contents include information about the bonding configuration, options and state of each slave.

For example, the contents of /proc/net/bonding/bond0 after the driver is loaded with parameters of mode=0 and miimon=1000 is generally as follows:

Ethernet Channel Bonding Driver: 2.6.1 (October 29, 2004)
Bonding Mode: load balancing (round-robin)
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 1000
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth1
MII Status: up
Link Failure Count: 1

Slave Interface: eth0
MII Status: up
Link Failure Count: 1

The precise format and contents will change depending upon the

bonding configuration, state, and version of the bonding driver.



#chage -M 99999 divakar ( changing the password expiry to infinity)

http://www.secguru.com/article/finding_hardware_details_your_linux_machine_without_using_screw_driver
http://www.quepublishing.com/articles/article.asp?p=101659&seqNum=15&rl=1 ==> shutdown/reboot
http://www.cs.biu.ac.il/cgi-bin/man?patchrm+1M


visudo


 

Change the permsission of /usr/bin/sudo
#chmod 4111 /usr/bin/sudo

To check what changes done by sudo users ===> grep sudo /var/log/messages

vi /usr/local/apache2/conf/httpd.conf
ps -aef|grep tomcat
/usr/local/netegrity/siteminder5QMR7/webagent/config/LocalConfig.conf
pkill httpd
/usr/local/apache2/bin/httpd -k start
head -10 /usr/local/apache2/logs/webagent.log

cd /usr/local/apache2/logs/
cd conf
cat WebAgent.conf
tar -xvf nete-wa-5qmr7-cr018-rhel30.tar

cat /etc/defaultrouter



route -rtn

wall " server will be shutdown as part of the regular maintenance"\

cd apache2
cd bin
./apachectl stop
./apachectl start

cd /home/bb/bb19c



date; init 6 ;tail -f /var/log/messages

fc -s 200 -- Rexcute the command from history
history | tail -100

List the files in current directory sorted by size ? - ls -l | grep ^- | sort -nr
List the hidden files in current directory ? - ls -a1 | grep "^\."
Delete blank lines in a file ? - cat sample.txt | grep -v ‘^$’ > new_sample.txt
Search for a sample string in particular files ? - grep “Debug” *.confHere grep uses the string “Debug” to search in all files with extension“.conf” under current directory.

Display the last newly appending lines of a file during appendingdata to the same file by some processes ? - tail –f Debug.logHere tail shows the newly appended data into Debug.log by some processes/user.
Display the Disk Usage of file sizes under each directory in currentDirectory ? - du -k * | sort –nr (or) du –k . | sort -nr
Change to a directory, which is having very long name ? - cd CDMA_3X_GEN*Here original directory name is – “CDMA_3X_GENERATION_DATA”.
Display the all files recursively with path under current directory ? - find . -depth -print
Set the Display automatically for the current new user ? - export DISPLAY=`eval ‘who am i | cut -d"(" -f2 | cut -d")" -f1'`Here in above command, see single quote, double quote, grave ascent is used. Observe carefully.
Display the processes, which are running under yourusername ? - ps –aef | grep MaheshvjHere, Maheshvj is the username.
List some Hot Keys for bash shell ? - Ctrl+l – Clears the Screen. Ctrl+r – Does a search in previously given commands in shell. Ctrl+u - Clears the typing before the hotkey. Ctrl+a – Places cursor at the beginning of the command at shell. Ctrl+e – Places cursor at the end of the command at shell. Ctrl+d – Kills the shell. Ctrl+z – Places the currently running process into background.
Display the files in the directory by file size ? - ls –ltr | sort –nr –k 5
How to save man pages to a file ? - man <command> | col –b > <output-file>Example : man top | col –b > top_help.txt
How to know the date & time for – when script is executed ? - Add the following script line in shell script.eval echo "Script is executed at `date`" >> timeinfo.infHere, “timeinfo.inf” contains date & time details ie., when script is executed and history related to execution.
How do you find out drive statistics ? - iostat -E
Display disk usage in Kilobytes ? - du -k
Display top ten largest files/directories ? - du -sk * | sort -nr | head
How much space is used for users in kilobytes ? - quot -af
How to create null file ? - cat /dev/null > filename1
Access common commands quicker ? - ps -ef | grep -i $@
Display the page size of memory ? - pagesize -a
Display Ethernet Address arp table ? - arp -a
Display the no.of active established connections to localhost ? - netstat -a | grep EST
Display the state of interfaces used for TCP/IP traffice ? - netstat -i
Display the parent/child tree of a process ? - ptree <pid> Example: ptree 1267
Show the working directory of a process ? - pwdx <pid> Example: pwdx 1267
Display the processes current open files ? - pfiles <pid> Example: pfiles 1267
Display the inter-process communication facility status ? - ipcs
Display the top most process utilizing most CPU ? - top –b 1
Alternative for top command ? - prstat -a


 

/etc/inet/hosts


 

/usr/local/apache2/bin/httpd -k status
/usr/local/apache2/bin/httpd -k restart

xxxx
http://www.samag.com/documents/s=10128/sam0706h/0706h.htm
http://www.idevelopment.info/data/Unix/Solaris/SOLARIS_InstallingSolsticeDiskSuite421.shtml
http://www.adminschoice.com/docs/solstice_disksuite.htm


http://www.finitesystems.com/PRODUCT/raid/raidlevel.htm
http://www.answers.com/topic/raid-technology?cat=technology - Formula
http://www.lascon.co.uk/d008005.htm --RAID Animation
http://compreviews.about.com/od/storage/l/aaRAIDPage1.htm


Please check the script http://www.samag.com/documents/s=1148/sam0107j/0107j.htm

 

Default Template for Easy Text To HTML Converter