You are on page 1of 9

vmstat iostat mpstat prstat -a netstat -nr fmadm faulty cat /etc/path_to_inst svcs -a | grep sendmail /etc/services dumpadm

svcs -a |grep picl sort -k 2 ( here we have specified the key 2 sorted according to that,here 2 is the 2nd field,default is ) sort -t . (t optio is used to specify FS,here it is .,default is blank characte r) sort -gr (?) join -j (?) read man sort full metadb fmadm repair fmdump - fault management log viewer ufsdump 0uf /dev/rmt/1 messages ( TO check manual backup of messages)

The single quotes are stronger than the double quotes. Got it? Okay. And the bac kslash is the strongest of all. backslash character is used to escape.Escape se quences use an escape character to change the meaning of the characters which fo llow it.Obviously single quotes will have a better efficiency than double quotes , because in single quotes, php does not process anything within it, where as wi th double quotes, php is constantly looking through the string for variable name s to check and callso its alright to use double quotes when your lazy, but be su re to avoid them when writing large loops, or commonly used functionsTo summariz e the main difference between single and double quotation marks: Single quotatio n marks do not interpret, and double quotation marks do. That is, if you put som ething in single quotation marks, Perl assumes that you want the exact character

s you place between the marks except for the slash-single quote (\') combination and double-slash (\\) combination. If you place text inside double quotation ma rks, however, Perl interprets variable names. Perl also interprets special chara cters inside double-quoted literal strings. escapes or quotes.concentrate on the definition o f quote.Rather then treating simply as a data or information it executes that & vice versa. Read more: http://www.dummies.com/how-to/content/contrasting-single-and-double-q uotes-in-perl.html#ixzz1GPzCu6ww psrinfo -v mt -f /dev/rmt/0n command (using the F option we can give path name) mt -f /dev/rmt/0 release man st (useful) Tapes written with SGI systems often can only be read using a different blocksiz e: tar tvfb 512 /dev/rmt/0 prtvtoc /dev/rdsk/c0t3d0s2 ( The prtvtoc command allows the contents of the lab el to be viewed.) To copy the partition information from the first disk to the second disk, use th is command: # prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2 To run fsck yourself, specify options as recommended by the boot script. For example: # fsck /dev/rdsk/c0t4d0s0

To check what has been written on the tape in verbose mode use After the execution of tar command tape will rewind,To eject tape

tar -tv mt offline

System programs are usually binary, having been compiled from C source code. The se are located in places like /bin, /usr/bin, /usr/local/bin, /usr/ucb, etc. They provide the func tions that you normally think of when you think of Unix. Some of these are sh, csh, date, who, more, and there are many others.

The groups command displays the group information for all the groups you belong to, e.g.: % groups staff sysadmin uts operator

id Control-U,Control-a, cp -ipr

env script filename ( to save all the log ) # metastat p ( if disks are in SVM control )

# metastat -t ( if disks are in SVM control ) # metadb ( if disks are in SVM control ) # metaset ( if disks are in SVM control) # vxdisk -e list ( if disks are in Veritas Control ) # vxdg list ( if disks are in Veritas Control ) # vxprint hrt ( if disks are in Veritas Control ) Without volume management, CD-ROMs must be explicitly mounted and ejected (examp le for SCSI-ID 6): - mkdir /tmp/cdrom - mount -F hsfs /dev/dsk/c0t6d0s0 /tmp/cdrom - (Work with CD mounted on /tmp/cdrom) - umount /tmp/cdrom - eject /dev/dsk/c0t6d0s0

fmadm faulty ( The Fault Manager attempts to automate as many activities as possible, so use of fmadm is typically not required. When the Fault Manager needs help from a human administrator, service repair technician, or Sun, it produces a message indicating its needs.)

/var/crash (whenever any crash happens) banner cpu (make the font stylish) printenv (lists all variables) more /etc/release For permanently unconnected interfaces, shut down the interface with ifconfig unplumb <interfac

e> (using a root shell).

When network interfaces are present with no cable attached during boot time, "In terface: No link" error messages are printed multiple times for each interface. These can be disabled by setting setenv tpe-linktest? false at the OK prompt.(when interfaces are active) Since our OS lies in /root So its space for this directory should not be high th at's why we create symbolic link to the other directories. In the case of a partition running out of space, symbolic links to other partiti ons have to be created. It is useful, especially for servers, to reserve one partition for the /var directory, so that growing log files or big files stored in /var/tmp by users cannot fill up the root partition, thus causing OS p roblems To view the current dump configuration, use the dumpadm command with no arguments see the man dumpadm ( useful info is there in that) -------------------------------------------------------------configuring interfa ces-----------------------------To configure the interface without re-starting the system, use the "ifconfig" c ommand. To add the two IP addresses, type: # ifconfig hme0:1 192.168.0.1 up # ifconfig hme0:2 192.168.0.2 up After having issued these two commands, the system would recognize the new IP ad dresses immediately, without re-booting the system. --->restart is necassry in this case---------------# ifconfig hme0:1 plumb # ifconfig hme0:2 plumb The system startup in Solaris searches the "/etc" directory for files named "hos tname.*". When it finds one or more of these files, it reads the hostname from t hem, looks up the hostname in the "/etc/hosts" file for a match, and if found, c onfigures the interface with the IP address of the match. ----------------------------------------

/dev/dsk and /dev/rdsk (Caontains our all disks) c0t6d0s0 is the internal CD-ROM-drive (often with SCSI-ID 6), and so on. chmod -R (recursively descend through the directory structure and change the mod es),Same with chown -R,

chmod 755 file1 or chmod u=rwx,go=rx file1 chmod 711 . or chmod u=rw,+x . or chmod u=rwx,go=x . # chown new_owner file % chgrp new_group file

pkginfo -l | more pkginfo -l SUNWsolnm (Solaris Naming Enabler,It's the package containing the /etc/release file which has the information like that lists the OS features and the best way to find ou t when it was born.Use /etc/release File Information to Determine the Solaris OE Revision,The /etc/release file was first introduced on the Solaris 2.5.1 Hardwa re 4/97 release and can be found on all subsequent Solaris versions. The purpose of the /etc/release file is to determine easily the base OS level or the OS release the system was upgraded to. The /etc/release file is the same wh ether obtained from the installed operating system, the CD ROM, or the installat ion image on the hard disk. ) # pkginfo l SUNWsccli

# sccli version ( System console command line interface)

# sccli sccli> about Please provide explorer output from the server, since we required it for further analysis.

For collecting the explorer

# cd /opt/SUNWexplo/bin

# ./explorer

# cd /opt/SUNWexplo/output

# ls

showrev (easy to see hostid, architecture, kernel version) showrev -p prtdiag -v -v Verbose mode. Displays the time of the most recent AC Power failure, and the most recent hardware fatal error information, and (if applicable) environmental status. The hardware fatal error information is useful to repair and manufacturing for detailed diagnostics of FRUs.

--------------prstat---Once we have identified which resource is being exhausted, you can use prstat to identify which processes causing it. Filesystem snapshotting is a process that keeps a "copy" of a filesystem as it s tood at a certain period of time. It's especially helpful with backups, so that a specific backup will contain consistent data prtdiag -v|grep -i alarm _________________interface commands______________________ For permanently unconnected interfaces, shut down the interface with ifconfig unplumb <interface> (using a root shell)

devfsadm(1M) maintains the /dev and /devices namespaces. It replaces the previous suite of devfs administration tools including drvconfig(1M), disks(1M), tapes(1M), ports(1M), audlinks(1M), and devlinks(1M). The default operation is to attempt to load every driver in the system and attach to all possible device instances. devfsadm then creates device special files in /devices and logical links in /dev. devfsadmd(1M) is the daemon version of devfsadm(1M). The daemon is started by the /etc/rc* scripts during system

startup and is responsible for handling both reconfiguration boot processing and updating /dev and /devices in response to dynamic reconfiguration event notifications from the kernel.

If a default installation was used, the Solaris installer tool divides the OS di sk into several slices: / (root), /usr, / var and /export/home. A Solaris 8 OS default installation creates three slices: (i) approximately 1 Gbyte root, (ii) swap (depending on memory capacity), and (iii) the remaining disk spa ce for /export/home. slice 0: / root-partition, incl. /usr, /var, /opt slice 1: swap swap-Partition, as large as physical memory slice 2: backup Do not change this partition! It is always the size of the whole disk slice 3: /export OS-independent data, home-directories slice 4: <not mounted>, to be used as ABE with Live Upgrade ( about 150% of the expected size of / ) slice 7: sds A small space reserved for Solstice Disksuite metadata -------------------Faulty disk in NPMS or NPDB node Metastat shows several times 'State: Needs maintenance' SCSI error reported in file /var/adm/messages SOLUTION: CONDITIONS: - Broken disk has been replaced - Solaris 10 installed - Disks mirrored using Solaris Volume Manager PROCEDURE: 1) Check which meta-mirrors are broken and needs maintenance: metastat 2) Recognise new disk: devfsadm 3) Update Solaris Volume Management database with the new device-id: : metadeva dm cxtxd0 4) Label the disk: format then select the disk and select 'l' for labeling 5) Transfer partition table from mirror disk: prtvtoc -s /dev/rdsk/cxtxdxs2 | fmthard -s - /dev/rdsk/cytydys2 where cxtxdxs2 is the mirrored-disk of the broken disk (= cytydys2) 6) Put the slice(s) in service again(sync) : metareplace -e dxx cxtxdxsx (see printout of step 1 for the device and meta-devices)

7) Repeat step 6 for each broken mirror 8) Check metadb status: metadb 9) For each broken entry (with 'w' or 'W' at flags field) do: metadb -d /dev/rdsk/cxtxdxsx metadb -a /dev/rdsk/cxtxdxsx --------------Example 1 Restarting a Service Instance The following command restarts the NFS server. The full FMRI for the default service instance is: svc:/network/nfs/server:default However, you can abbreviate the full FMRI as follows: # svcadm restart nfs/server Example 2 Disabling the Standard HTTP Server The following command disables the standard HTTP server, using an abbreviated FMRI: $ svcadm disable http Example 3 Enabling an Instance and Its Dependent Instances The following command enables the foo:bar instance, and all instances on which it depends: $ svcadm enable -r foo:bar Example 4 Synchronously enabling an instance The following command enables the foo:bar instance. The command will not return until the instance comes online or svcadm determines it is not possible for the service to come online. $ svcadm enable -s foo:bar Example 5 Restricting and Restoring the Running Services The following command restricts the running services to single user mode: # svcadm milestone milestone/single-user The following command restores the running services: # svcadm milestone all

You might also like