Friday, June 11, 2010
RAM Size in Solaris Server
#prtconf | grep Mem
Solaris is a virtual memory system. The total physical memory can be seen using prtconf. as said by user . Memory is allocated in units called pages, and you can use the pagesize command to know the number of bytes per page:
% /usr/bin/pagesize
Actually Physical memory usage can be classified into four groups:
Kernel memory mapped into kernel address space
Process memory is mapped into a process address space
Filesystem cache memory that is not mapped into any address space
Free memory that is not mapped into any address space
Let us see how to find the memory usage of each:
The simplest summary of kernel memory usage comes from sar.
% sar -k 1
Process memory consists of an address space divided into segments. The segments can be viewed using /usr/proc/bin/pmap on any system running Solaris 2.5 or later.
% /usr/proc/bin/pmap
File system has cache memory and this is the part of memory that is invisible.
The memps -m command lists the files that are cached in order
# memps -m | more
Free memory that is not mapped into any address space
Wednesday, June 2, 2010
How to check Physical Memory utlization on solaris
check Total physical memory:
# prtdiag -v | grep Memory
# prtconf | grep Memory
---
check Free physical Memory:
# top (if available)
# sar -r 5 10
Free Memory=freemen*8 (pagesize=8k)
# vmstat 5 10
Free Memory = free
---
For swap:
# swap -s
# swap -l
or
#prstat -s size --> wil show the memory utlization for each process
Thursday, May 13, 2010
To come out from solaris zone console
i102sptest console login:
i102sptest console login: ~.
[Connection to zone 'i102sptest' console closed]
root@iss2s102 #
Tuesday, May 4, 2010
To change ownership/permissions for a soft-link files
use -h option
#chown -h ownername:groupname
#chown -h oracle:oracle file1
Monday, May 3, 2010
Backup an entire hard disk using dd command
Backup an entire hard disk using dd command :-
The ' dd ' command is one of the original Unix utilities and should be in everyone's tool box. It can strip headers, extract parts of binary files and write into the middle of floppy disks
For blocked I/O, the dd command has no competition in the standard tool set. One could write a custom utility to do specific I/O or formatting but, as dd is already available almost everywhere, it makes sense to use it.
Like most well-behaved commands, dd reads from its standard input and writes to its standard output, unless a command line specification has been given. This allows dd to be used in pipes, and remotely with the rsh remote shell command.
Unlike most commands, dd uses a keyword=value format for its parameters. This was reputedly modeled after IBM System/360 JCL, which had an elaborate DD 'Dataset Definition' specification for I/O devices. A complete listing of all keywords is available from GNU dd with
# dd --help
For more options check dd man page
Using dd you can create backups of an entire harddisk
full hard disk copy
dd if=/dev/hdx of=/dev/hdy
dd if=/dev/hdx of=/path/to/image
dd if=/dev/hdx | gzip > /path/to/image.gz
Hdx could be hda, hdb etc. In the second example gzip is used to compress the image if it is really just a backup.
Restore Backup of hard disk copy
dd if=/path/to/image of=/dev/hdx
gzip -dc /path/to/image.gz | dd of=/dev/hdx
MBR backup
In order to backup only the first few bytes containing the MBR and the partition table you can use dd as well.
dd if=/dev/hdx of=/path/to/image count=1 bs=512
MBR restore
dd if=/path/to/image of=/dev/hdx
Add "count=1 bs=446" to exclude the partition table from being written to disk. You can manually restore the table
Thursday, April 15, 2010
To set an IP address permanently in Solaris
#vi /etc/hostname.hme0
change the ip address as required in this file
#vi /etc/netmasks
change the netmask as required in this file
UPDATE: It seems that Solaris 10 now checks the /etc/inet/ipnodes file first before the /etc/hosts file to set the IP. So, if the IP is currently set in /etc/inet/ipnodes, you will have to change it there as well.
* IP -> /etc/hosts
* Netmask -> /etc/netmasks
* Gateway -> /etc/defaultrouter
* IP (again) -> /etc/inet/ipnodes (This is new in Solaris 10)
* DNS Servers -> /etc/resolv.conf
Sunday, December 27, 2009
After replace the faulty HBA Card, need to perform below actions
1)SAN Team update the zoning and masking for the new HBA-WWN No like <10000000C9388B24>
2) SA Team run the below commands, these steps will get the path active
#update_drv -f sd ; devfsadm -C -c disks
#update_drv -f sd ; devfsadm -C -c disks
#vxdctl enable