1 . Installing pkg-get for Solaris , Provided your machine has internet connectivity
pkgadd -d http://mirror.opencsw.org/opencsw/pkg_get.pkg
2 . Collect coredump on x86/64 Solaris systems
Setup
-
Take the appropriate steps to ensure the dump device is set up properly, and
that savecore is enabled. See the dumpadm(1M) manual page for details. -
Boot the system with kadb.
From a command line, type: #eeprom boot-file=kadb and reboot,
or, at the initial boot prompt, when it says "Select (B)oot or
(I)nterpreter:" enter "b kadb -d" and press return.
Please Note: if Solaris X86 01/06 (newboot) is used simply add "kadb" to the end of the initrd line.
root (hd0,0,a)
kernel /platform/i86pc/multiboot kadb
module /platform/i86pc/boot_archive
-
The next time the system hangs, send a break, which if it works, will drop
to the kadb/kmdb prompt:
Drop to kadb, generate a core file
From a directly attached keyboard or serial port connection, type:
F1-A - press the "F1" and "A" keys, simultaneously.
The control-alt-d key sequence also works.
If using a Sun AMD Opteron[TM] based platform.
On X4200/X4100 Servers, once connected to the SP console (start /SP/console from ILOM prompt), and then press Esc followed by shift+b to send break.
On V65x Servers, send a break to the console, and then press the key corresponding to the sysrq-command to send.
On V20z and V40z, once connected via the platform console, press ^Ecl0 to send the break. That is, press CONTROL-E, then the letter 'c', then the letter 'l', then the number '0'.
On Blades (B100x, B200x) to send a break from the SC console, type break s'N'
were 'N' is the slot number followed by 'y' (yes) when prompted.
NOTE: If using the Serial-over-LAN functionality for the Sun AMD Opteron
platform, use the alternate break sequence explained in infodoc 82530.
Once at the kadb prompt,
type $
followed by the "less-than" key
followed by systemdump
This will generate a core file, which can be retrieved from:
/var/crash/'uname -n' (or wherever the local system stores core files)
3 . Sort commands
sort -t. -nk1,1 -k2,2 -k3,3 -k4,4
ypcat hosts | grep 10.12.153 | awk '{ print $1 }' | sort -t. -nk1,1 -k2,2 -k3,3 -k4,4 | more
4 . Find command examples
- -mtime -60 means less than 60 days.
- -mtime 60 If you skip + or - it means exactly 60 days.
So to find text files that were last modified 60 days ago, use
$ find /home/you -iname "*.txt" -mtime -60 -print
Display content of file on screen that were last modified 60 days ago, use
$ find /home/you -iname "*.txt" -mtime -60 -exec cat {} \;
Count total number of files using wc command
$ find /home/you -iname "*.txt" -mtime -60 | wc -l
You can also use access time to find out pdf files. Following command will print the list of all pdf file that were accessed in last 60 days:
$ find /home/you -iname "*.pdf" -atime -60 -type -f
List all mp3s that were accessed exactly 10 days ago:
$ find /home/you -iname "*.mp3" -atime 10 -type -f
There is also an option called -daystart. It measure times from the beginning of today rather than from 24 hours ago. So, to list the all mp3s in your home directory that were accessed yesterday, type the command
$ find /home/you -iname "*.mp3" -daystart -type f -mtime 1
Where,
- -type f - Only search for files and not directories
http://www.dedoimedo.com/computers/vmware-esxi-clone-machine.html
6 . Disk usage commands
df -lh | grep -v net | awk '{ print $6,$5 }'
7 . Setting timezone - HP-UX
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1233303304989+28353475&threadId=1008029
8 . Windows rsh and shutdown
rsh sunone142 tsshutdn.exe 60 /reboot -v
TO work this ..
1. install and start terminal services . on all windows systems
2. Install rsh from http://sourceforge.net/projects/rshd/
WINDOWS RSHD INSTALL -------------------- 1) In DOS, Run: rshd1.8-Setup.exe ..and follow the onscreen gui instructions, using all defaults. 2) To enable rshd: cd "\program files\rshd\bin" rshd -install -r net start rshd
To check the version of windows : rsh sunone142 ver
An Example :
rsh sunone142 tsshutdn.exe 5 /reboot -v
Sending message to Session Console.
Notifying Users, Type ^C to Cancel Shutdown.
System shutdown in progress ... Logging off all users ...
Sending message to Session Console.
Notifying Users, Type ^C to Cancel Shutdown.
Shutdown is complete.
The system will now reboot.
Configuring NIS client - IBM AIX
http://www.unix.com/aix/32194-aix-nis-client.html
Increasing root file system
http://unix.ittoolbox.com/groups/technical-functional/ibm-aix-l/increasing-file-system-in-aix-1492756
uptime for windows
http://support.microsoft.com/kb/q232243/
How to find network interface in Solaris 10
kstat -c net | grep netJust in case, ifconfig -a did not give the interface I want.
Mounting pen drive on Solaris sunray
Just plug the usb to the Sunray to access the device .
You will be able to see the disks under :
cd /tmp/SUNWut/mnt
Unmounting/disconnecting USB devices: To remove the device, first run the following command to prepare the device for removal:
% /opt/SUNWut/bin/utdiskadm -r disk1 disk1 is ready for unplugging
Enable Administrator account : Windows Vista
Follow following steps to Enable Administrator Account in Vista home machines.
1. Turn off /Un-check UAC(User Account Control from Control Panel > User accounts > Turn User Account Control On or Off.
2. Reboot the System
3. Go to Command Prompt and execute following
- Activate administrator:
C:\> net user Administrator / Active:Yes
- Give New Password for Administrator
C:\> net user Administrator < "new password">
4. Logoff and logon as administrator
Change windows IP address from command line
Example : netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1
Wiki : Solaris zones
http://www.solarisinternals.com/wiki/index.php/Zones
Raid disk space calculator
http://www.ibeast.com/content/tools/RaidCalc/RaidCalc.asp
Mounting usb devices under Solaris
http://www.softpanorama.org/Solaris/Disks_and_filesystems/mounting_cdrom_on_solaris.shtml
IPV6 on Linux
http://tldp.org/HOWTO/Linux+IPv6-HOWTO/systemcheck-kernel.html
HP-UX help
http://users.cis.fiu.edu/~tho01/psg/hpux.html
How To Enable Samba And SWAT In Solaris 10
1. Solaris 10 comes with built-in versions of Samba and SWAT. This short guide will show you how to enable them.
2. Create a file called smb.conf in /etc/sfw/. Add these lines to the file:
# Global parameters
[global]
workgroup = WORKGROUP
server string =
3. Open /etc/services in a text editor. Below the line that says "ldaps 636/udp", add this line:
swat 901/tcp # Samba swat
4. Open /etc/inetd.conf in a text editor. At the very bottom, add these lines:
netbios-ssn stream tcp nowait root /usr/sfw/sbin/smbd smbd
netbios-ns dgram udp wait root /usr/sfw/sbin/nmbd nmbd
swat stream tcp nowait root /usr/sfw/sbin/swat swat
5. Open a terminal and run "inetconv". (This command "activates" the lines that we added to inetd.conf.)
6. Restart the computer.
7. Samba and SWAT are now ready to go! Open your web browser and connect to http://yourhostname:901. Input "root" for the user name and the root password as the password.
8. You should now be connected to SWAT. From here, you can create file shares, set Samba passwords, and change any of your Samba settings. Note that a Solaris user account must exist before you can assign a Samba password to it. For example, if I wanted to create a Samba password for "jdoe," jdoe must exist as a valid user on the Solaris system before jdoe can be assigned a Samba password.
boot: linux ks=floppy
The linux ks=floppy command also works if the ks.cfg file is located on a vfat filesystem on a floppy diskette and you boot from the Red Hat Linux CD-ROM.
An alternate boot command for booting off the Red Hat Linux CD-ROM and having the kickstart file on a vfat filesystem on a floppy diskette is:
boot: linux ks=hd:fd0/ks.cfg |
If you need to use a driver disk with kickstart, you can still have the kickstart file on a floppy disk:
boot: linux ks=floppy dd |
The Red Hat Linux installation program looks for a kickstart file if the ks command line argument is passed to the kernel. The command line argument can take a number of forms:
- ks=nfs:<server>:/<path>
-
The installation program will look for the kickstart file on the NFS server <server>, as file <path>. The installation program will use DHCP to configure the Ethernet card. For example, if your NFS server is server.example.com and the kickstart file is in the NFS share /mydir/ks.cfg, the correct boot command would be ks=nfs:server.example.com:/mydir/ks.cfg.
- ks=http://<server>/<path>
-
The installation program will look for the kickstart file on the HTTP server <server>, as file <path>. The installation program will use DHCP to configure the Ethernet card. For example, if your HTTP server is server.example.com and the kickstart file is in the HTTP directory /mydir/ks.cfg, the correct boot command would be ks=http://server.example.com/mydir/ks.cfg.
- ks=floppy
-
The installation program looks for the file ks.cfg on a vfat filesystem on the floppy in drive /dev/fd0.
- ks=hd:<device>/<file>
-
The installation program will mount the filesystem on <device> (which must be vfat or ext2), and look for the kickstart configuration file as <file> in that filesystem (for example, ks=hd:sda3/mydir/ks.cfg).
- ks=file:/<file>
-
The installation program will try to read the file <file> from the filesystem; no mounts will be done. This is normally used if the kickstart file is already on the initrd image.
- ks=cdrom:/<path>
http://www.dnsstuff.com/
Configuring NIS clients on HP-UX systems !!!
Make sure in the /etc/nsswitch.conf file : for hosts: files nis [NOTFOUND=return] files
-
Log in as root to the NIS client.
-
Add the -ypset option to the YPBIND_OPTIONS variable in the /etc/rc.config.d/namesvrs file, as follows:
YPBIND_OPTIONS="-ypset"
3. In the /etc/rc.config.d/namesvrs file, set the YPSET_ADDR variable to the IP address of an NIS server, as in the following example:
YPSET_ADDR="15.13.115.168" Issue the following commands to restart the NIS client
/sbin/init.d/nis.client stop /sbin/init.d/nis.client start
HP-UX patch bundle http://www2.itrc.hp.com/service/patch/releaseIndexPage.do
http://www.dhcp-handbook.com/dhcp_faq.html
redhat.com | End of Life Products | Linux Links
https://www.redhat.com/security/updates/eol/
The search engine for Unix Commands
coolcommands.com is a search engine for UNIX system administrators. Our database provides access to useful commands for all flavours of UNIX including:
http://www.coolcommands.com/
A useful website
http://everythingsolaris.org/
AIX Installation and customiztion
http://bio.gsi.de/DOCS/aix41install.html
check the memory modules inside a server without opening the box
http://www.4schmidts.com/memconf.html
http://www.4schmidts.com/unix.html
Setting Display to DVI port on SB 2500 Follow these steps to get the Display on the DVI port. # This is the Script to change Display to DVI on SB 2500 servers # /etc/init.d/dtlogin stop fbconfig -doublewide disable fbconfig -doublehigh disable fbconfig -dev /dev/fbs/pfb0b -res SUNW_STD_1280x1024x60 now /etc/init.d/dtlogin start # echo " reboot now " NOTE: You will not gte the OK prompt, nor will be able to see the boot messages. You will just see the login screen once the server is booted up. Thanks
Temporary snapshot of file systems ( Solaris )
To take a snap shot of the /space filesystem and delete the same, very useful when you need to backup from a stable system or you can use snapshot it self as a backup in case of emergencies
fssnap -o bs=/test /space
mount -o ro /dev/fssnap/0 /mnt
cd /mnt
touch /space/foo
ls /mnt/foo
file not found
fssnap -d /space (delete the snap shot)
Solaris running 32 or 64 bit mode
To find out if the OS has been configured to run in 32 bit or 64 bit Mode
On a 32 bit machine
-------------------
# isainfo -v
32-bit sparc applications
On a 64 bit machine
-------------------
# isainfo -v
64-bit sparcv9 applications
32-bit sparc applications
TO uncompress cpio formats cpio -idvI combinedsol10_b66.something Run this command in the current folder.
All about cdrw
_________________________________________________________________
The new MSN toolbar! Your shortcut to the internet! http://toolbar.msn.co.in/ Access a world of convenience!
ISO, CDR, and CDRW in Linux
Updated September 25, 2002
Created December 29, 2000
Autogenerated Site Map
Search this Site!:
| Search this site powered by FreeFind |
| |
CREATE CD2FILE BURN BLANK CD2CD VERIFY LOOP SETUP DETECT RESOURCES
Creating an ISO Image
Here are a couple of different commands for creating an ISO image: [root@server /root]# mkisofs -RJ -o image.iso /burndirectory/ [root@server /root]# mkisofs -J -o image.iso /burndirectory mkisofs -o image.iso -b images/boot.img -c boot.cat -R -J -T /my/file/tree |
The options (-RJ) will preserve long filenames, casing and Rock Ridge extensions (long mixed-case filenames and symbolic links for *nix).
-J Generate Joliet directory records in addition to regular iso9660 file names. This is primarily use- ful when the discs are to be used on Windows-NT or Windows-95 machines. The Joliet filenames are specified in Unicode and each path component can be up to 64 Unicode characters long. -R Generate SUSP and RR records using the Rock Ridge protocol to further describe the files on the iso9660 filesystem.
CREATE CD2FILE BURN BLANK CD2CD VERIFY LOOP SETUP DETECT RESOURCES
Copying a CD to a File on your Filesystem
Here are a couple of mentods for copying a CD to a file: [root@server /root]# dd if=/dev/cdrom of=image.iso [root@server /root]# cat /dev/cdrom >image.iso |
More info can be found here: cdimage.html
CREATE CD2FILE BURN BLANK CD2CD VERIFY LOOP SETUP DETECT RESOURCES
Buring an ISO Image to CDR or CDRW
[root@server /root]# cdrecord -v dev=3,0,0 image.iso |
CREATE CD2FILE BURN BLANK CD2CD VERIFY LOOP SETUP DETECT RESOURCES
Blanking CDRW Media
Here are a few methods to blank CDRW media: [root@server /root]# cdrecord blank=fast dev=3,0,0 [root@server /root]# cdrecord blank=all dev=3,0,0 [root@server /root]# cdrecord blank=all -force dev=3,0,0 |
CREATE CD2FILE BURN BLANK CD2CD VERIFY LOOP SETUP DETECT RESOURCES
Copying Directly from One CD to Another
[root@server /root]# cdrecord -v dev=3,0,0 -isosize /dev/cdrom |
Where the dev designation is the cd burner and /dev/cdrom is your regular cdrom drive.
CREATE CD2FILE BURN BLANK CD2CD VERIFY LOOP SETUP DETECT RESOURCES
Verifying an ISO Image or CDR/CDRW
[root@server /root]# md5sum - or - [root@server /root]# diff /dev/cdrom image.iso - or - [root@server /root]# mount /mnt/cdrom; [root@server /root]# mount -t iso9660 iso.image /mnt/isotest -o loop; [root@server /root]# diff -r /mnt/cdrom /mnt/isotest - or - [root@server /root]# md5sum /dev/cdrom >md5sum-cdrom.txt [root@server /root]# md5sum image.iso >md5sum-file.txt #Script to verify the md5sum results: echo "Verifying MD5SUMS:" MD5SUM1=md5sum-file.txt MD5SUM2=md5sum-cdrom.txt cat $MD5SUM1 | while read CODE NAME; do if [ -n "`cat $MD5SUM2 | grep $CODE`" ]; then echo "Success: $NAME" else echo "Failure: $NAME" fi done |
CREATE CD2FILE BURN BLANK CD2CD VERIFY LOOP SETUP DETECT RESOURCES
Using an ISO Image without Burning it to CD Media
Mount it via the loop device: [root@server /root]# mkdir /mnt/isotest [root@server /root]# mount -t iso9660 /dev/cdrom /mnt/isotest -o loop [root@server /root]# ls /mnt/isotest |
More Info:
loop.html
cdimage.html
CREATE CD2FILE BURN BLANK CD2CD VERIFY LOOP SETUP DETECT RESOURCES
Setting up your system to work with cdrecord
Before performing the entries mentioned for /etc/modules.conf, try just adding the following line to the global section of /etc/lilo.conf:append="hda=ide-scsi"
Then run /sbin/lilo, reboot, then run cdrecord -scanbus to see if your CDRW is detected:
[root@server /root]# /sbin/lilo [root@server /root]# shutdown -r now ... [root@server /root]# cdrecord -scanbus |
If the above doesn't work, then you may need to complete the following steps:
Red Hat 7.1 (and probably 6.2 and 7.0) should already have a kernel that is ready to work with cdrecord. You probably need to add some or all of the following entries into /etc/modules.conf (or /etc/conf.modules):
options ide-cd ignore=hda # tell the ide-cd module to ignore hdb #alias scd0 sr_mod # load sr_mod upon access of scd0 alias scd0 ide-scsi # load sr_mod upon access of scd0 #pre-install ide-scsi modprobe imm # uncomment for some ZIP drives only pre-install sg modprobe ide-scsi # load ide-scsi before sg pre-install sr_mod modprobe ide-scsi # load ide-scsi before sr_mod pre-install ide-scsi modprobe ide-cd # load ide-cd before ide-scsiScript for checking out your system: cdre_sh.txt
CREATE CD2FILE BURN BLANK CD2CD VERIFY LOOP SETUP DETECT RESOURCES
Finding your CDR or CDRW drive
[root@server /root]# cdrecord -scanbus |
CREATE CD2FILE BURN BLANK CD2CD VERIFY LOOP SETUP DETECT RESOURCES
Resources
http://lhd.zdnet.com/LDP/HOWTO/CD-Writing-HOWTO.html#toc3 - CD-Writing HOWTO Search this Site!:
| Search this site powered by FreeFind |
| |
Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html
Thank you for your interesting and informative blog. I have enjoyed reading it and appreciate the work you have put into it. Here is some relevant information for you to review .
ReplyDeleteSWAT Commander Sets