LDOM guest domains currently have no way to gather information about their control domain.
For asset/inventory and health check tools it would be very useful if there was a Solaris tool that could be run on the guest domain to list relevant information about the control domain.
Hostname, hostid, IP addresses, serial number, mac addresses of parent would all be useful ways to tie an LDOM to its physical hardware.
The command would also be used to simply ask am I a guest LDOM,similar to clinfo Solaris command which asks am I a member of a cluster.
$ ldominfo
Host is running in guest LDOM
$ ldominfo -p
Host is running in a guest LDOM
Control hostname is: foobar
Control hostid is: 831d34656
Control mac address is: 00:14:g7:12:j8:56
..
$ ldominfo
Host is running in control LDOM
$ ldominfo
Host is not running in an LDOM
Exit status would be 0 if a host is an LDOM similar to clinfo.
Without this command administrators must grovel around in /devices,look at network interface or disk names, look for SUNWldm package, ..to try and guess if a machine is a guest or control LDOM.
I written from my research and experience, the methods described here are worked for me, Hope this may help you. post your comments to motivate me
Network statistics for Solaris OS
netstat displays the contents of various network-related data structures in depending on the options selected.
Syntax
netstat
multiple options can be given at one time.
Options
-a – displays the state of all sockets.
-r – shows the system routing tables
-i – gives statistics on a per-interface basis.
-m – displays information from the network memory buffers. On Solaris, this shows statistics
for STREAMS
-p [proto] – retrieves statistics for the specified protocol
-s – shows per-protocol statistics. (some implementations allow -ss to remove fileds with a value of 0 (zero) from the display.)
-D – display the status of DHCP configured interfaces.
-n do not lookup hostnames, display only IP addresses.
-d (with -i) displays dropped packets per interface.
-I [interface] retrieve information about only the specified interface.
-v be verbose
interval – number for continuous display of statictics.
Example
$netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0 192.168.1.11 U 1 1444 le0
224.0.0.0 192.168.1.11 U 1 0 le0
default 192.168.1.1 UG 1 68276
127.0.0.1 127.0.0.1 UH 1 10497 lo0This shows the output on a Solaris machine who’s IP address is 192.168.1.11 with a default router at 192.168.1.1
Results and Solutions
A.) Network availability
The command as above is mostly useful in troubleshooting network accessibility issues . When outside network is not accessible from a machine check the following
1. if the default router ip address is correct
2. you can ping it from your machine.
3. If router address is incorrect it can be changed with route add command. See man route for more information.
route command examples
$route add default
$route add 192.0.2.32
If the router address is correct but still you can’t ping it there may be some network cable /hub/switch problem and you have to try and eliminate the faulty component .
B.) Network Response
$ netstat -i
Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue
lo0 8232 loopback localhost 77814 0 77814 0 0 0
hme0 1500 server1 server1 10658 3 48325 0 279257 0This option is used to diagnose the network problems when the connectivity is there but it is slow in response .
Values to look at:
* Collisions (Collis)
* Output packets (Opkts)
* Input errors (Ierrs)
* Input packets (Ipkts)
The above values will give information to workout
i. Network collision rate as follows :
Network collision rate = Output collision counts / Output packets
Network-wide collision rate greater than 10 percent will indicate
* Overloaded network,
* Poorly configured network,
* Hardware problems.
ii. Input packet error rate as follows :
Input Packet Error Rate = Ierrs / Ipkts.
If the input error rate is high (over 0.25 percent), the host is dropping packets. Hub/switch cables etc needs to be checked for potential problems.
C. Network socket & TCP Connection state
Netstat gives important information about network socket and tcp state . This is very useful in
finding out the open , closed and waiting network tcp connection .
Network states returned by netstat are following
CLOSED ---- Closed. The socket is not being used.
LISTEN ---- Listening for incoming connections.
SYN_SENT ---- Actively trying to establish connection.
SYN_RECEIVED ---- Initial synchronization of the connection under way.
ESTABLISHED ---- Connection has been established.
CLOSE_WAIT ---- Remote shut down; waiting for the socket to close.
FIN_WAIT_1 ---- Socket closed; shutting down connection.
CLOSING ---- Closed,
then remote shutdown; awaiting acknowledgement.
LAST_ACK ---- Remote shut down, then closed ;awaiting acknowledgement.
FIN_WAIT_2 ---- Socket closed; waiting for shutdown from remote.
TIME_WAIT ---- Wait after close for remote shutdown retransmission..Example
#netstat -a
Local Address Remote Address Swind Send-Q Rwind Recv-Q State
*.* *.* 0 0 24576 0 IDLE
*.22 *.* 0 0 24576 0 LISTEN
*.22 *.* 0 0 24576 0 LISTEN
*.* *.* 0 0 24576 0 IDLE
*.32771 *.* 0 0 24576 0 LISTEN
*.4045 *.* 0 0 24576 0 LISTEN
*.25 *.* 0 0 24576 0 LISTEN
*.5987 *.* 0 0 24576 0 LISTEN
*.898 *.* 0 0 24576 0 LISTEN
*.32772 *.* 0 0 24576 0 LISTEN
*.32775 *.* 0 0 24576 0 LISTEN
*.32776 *.* 0 0 24576 0 LISTEN
*.* *.* 0 0 24576 0 IDLE
192.168.1.184.22 192.168.1.186.50457 41992 0 24616 0 ESTABLISHED
192.168.1.184.22 192.168.1.186.56806 38912 0 24616 0 ESTABLISHED
192.168.1.184.22 192.168.1.183.58672 18048 0 24616 0 ESTABLISHED if you see a lots of connections in FIN_WAIT state tcp/ip parameters have to be tuned because the
connections are not being closed and they gets accumulating . After some time system may run out of
resource . TCP parameter can be tuned to define a time out so that connections can be released and used by new connection.
Syntax
netstat
multiple options can be given at one time.
Options
-a – displays the state of all sockets.
-r – shows the system routing tables
-i – gives statistics on a per-interface basis.
-m – displays information from the network memory buffers. On Solaris, this shows statistics
for STREAMS
-p [proto] – retrieves statistics for the specified protocol
-s – shows per-protocol statistics. (some implementations allow -ss to remove fileds with a value of 0 (zero) from the display.)
-D – display the status of DHCP configured interfaces.
-n do not lookup hostnames, display only IP addresses.
-d (with -i) displays dropped packets per interface.
-I [interface] retrieve information about only the specified interface.
-v be verbose
interval – number for continuous display of statictics.
Example
$netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0 192.168.1.11 U 1 1444 le0
224.0.0.0 192.168.1.11 U 1 0 le0
default 192.168.1.1 UG 1 68276
127.0.0.1 127.0.0.1 UH 1 10497 lo0This shows the output on a Solaris machine who’s IP address is 192.168.1.11 with a default router at 192.168.1.1
Results and Solutions
A.) Network availability
The command as above is mostly useful in troubleshooting network accessibility issues . When outside network is not accessible from a machine check the following
1. if the default router ip address is correct
2. you can ping it from your machine.
3. If router address is incorrect it can be changed with route add command. See man route for more information.
route command examples
$route add default
$route add 192.0.2.32
If the router address is correct but still you can’t ping it there may be some network cable /hub/switch problem and you have to try and eliminate the faulty component .
B.) Network Response
$ netstat -i
Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue
lo0 8232 loopback localhost 77814 0 77814 0 0 0
hme0 1500 server1 server1 10658 3 48325 0 279257 0This option is used to diagnose the network problems when the connectivity is there but it is slow in response .
Values to look at:
* Collisions (Collis)
* Output packets (Opkts)
* Input errors (Ierrs)
* Input packets (Ipkts)
The above values will give information to workout
i. Network collision rate as follows :
Network collision rate = Output collision counts / Output packets
Network-wide collision rate greater than 10 percent will indicate
* Overloaded network,
* Poorly configured network,
* Hardware problems.
ii. Input packet error rate as follows :
Input Packet Error Rate = Ierrs / Ipkts.
If the input error rate is high (over 0.25 percent), the host is dropping packets. Hub/switch cables etc needs to be checked for potential problems.
C. Network socket & TCP Connection state
Netstat gives important information about network socket and tcp state . This is very useful in
finding out the open , closed and waiting network tcp connection .
Network states returned by netstat are following
CLOSED ---- Closed. The socket is not being used.
LISTEN ---- Listening for incoming connections.
SYN_SENT ---- Actively trying to establish connection.
SYN_RECEIVED ---- Initial synchronization of the connection under way.
ESTABLISHED ---- Connection has been established.
CLOSE_WAIT ---- Remote shut down; waiting for the socket to close.
FIN_WAIT_1 ---- Socket closed; shutting down connection.
CLOSING ---- Closed,
then remote shutdown; awaiting acknowledgement.
LAST_ACK ---- Remote shut down, then closed ;awaiting acknowledgement.
FIN_WAIT_2 ---- Socket closed; waiting for shutdown from remote.
TIME_WAIT ---- Wait after close for remote shutdown retransmission..Example
#netstat -a
Local Address Remote Address Swind Send-Q Rwind Recv-Q State
*.* *.* 0 0 24576 0 IDLE
*.22 *.* 0 0 24576 0 LISTEN
*.22 *.* 0 0 24576 0 LISTEN
*.* *.* 0 0 24576 0 IDLE
*.32771 *.* 0 0 24576 0 LISTEN
*.4045 *.* 0 0 24576 0 LISTEN
*.25 *.* 0 0 24576 0 LISTEN
*.5987 *.* 0 0 24576 0 LISTEN
*.898 *.* 0 0 24576 0 LISTEN
*.32772 *.* 0 0 24576 0 LISTEN
*.32775 *.* 0 0 24576 0 LISTEN
*.32776 *.* 0 0 24576 0 LISTEN
*.* *.* 0 0 24576 0 IDLE
192.168.1.184.22 192.168.1.186.50457 41992 0 24616 0 ESTABLISHED
192.168.1.184.22 192.168.1.186.56806 38912 0 24616 0 ESTABLISHED
192.168.1.184.22 192.168.1.183.58672 18048 0 24616 0 ESTABLISHED if you see a lots of connections in FIN_WAIT state tcp/ip parameters have to be tuned because the
connections are not being closed and they gets accumulating . After some time system may run out of
resource . TCP parameter can be tuned to define a time out so that connections can be released and used by new connection.
Collect Sun Explorer from Network
Explorer for Sun systems and Solaris OS
The Below configuration and paths are used to run the explorer from single source point. I Used NFS automount for Path Availability.So solaris systems can execute the command to collect the Explorer. and maintain the output in one location.
Explorer version 6.5.
Installed path = /home/rvinayag/ 6.5ins/
Output files Path = /home/rvinayag/6.5ins/opt/SUNWexplo/output/
Binary Path for explorer = /home/rvinayag/6.5ins/opt/SUNWexplo/bin
Server configuration files at = /home/rvinayag/6.5ins/etc/opt/SUNWexplo/default/
***********************************************
1, Login to any solaris system to run the explorer
Ex: Host1 is my test machine.
host1 # cd /home/rvinayag/6.5ins/opt/SUNWexplo/bin
host1 # ./explorer -d /home/rvinayag/6.5ins/etc/opt/SUNWexplo/default/host1 -w default
WARNING: EXP_REPLY not set!
1 warnings found in /home/nynfs01/rvasag/6.5ins/etc/opt/SUNWexplo/default/host1
Sep 14 04:11:47 host1[4087] explorer: explorer ID: explorer.83868387.host1-2011.09.14.08.11
Sep 14 04:11:49 host1[4087] ilomsnapshot_start: RUNNING
Sep 14 04:11:50 host1[4087] patch: RUNNING
Once it completed the Explorer file available in output folder as below.
-rw-r--r-- 1 admin admin 4688789 Sep 14 06:16 explorer.83868387.host1-2011.09.14.11.11.tar.gz
#####################
2, When you run first time explorer as below syntax, you may encounter error for default settings.
host1 abash-3.1# pwd
/home/rvinayag/6.5ins/opt/SUNWexplo/bin
host1 # ./explorer -d /home/rvinayag/6.5ins/etc/opt/SUNWexplo/default/host1 -w default
WARNING: EXP_SERIAL_8323ee7f not set!
WARNING: EXP_REPLY not set!
2 warnings found in /home/nynfs01/rvasag/6.5ins/etc/opt/SUNWexplo/default/host1
ATTENTION: Are you using Oracle Explorer Data Collector to help in the resolution
of an issue on a Sun product? In some cases, remote collaboration tools such
as Oracle Shared Shell can accelerate issue resolution. Ask your Service
representative about Shared Shell or visit http://www.sun.com/sharedshell.
It's secure, safe, and easy to use.
### Dont run the "explorer –g" to update explorer default file. Refer Troubleshooting steps below
This error is common for running explorer for new system, follow few steps to update repository to get rid of this error
Sun Explorer : Follow the below instructions
host1 abash-3.1# cd /home/rvinayag/6.5ins/etc/opt/SUNWexplo/default
host1 abash-3.1# cp explorer host1 <<<<<< copy a default file and name it as hostname for easy reference
host1 abash-3.1# hostid
83868387
host1 abash-3.1# vi host1
Modify the lines :
# Serial number for hostid 83868387
EXP_SERIAL_83868387="host1"
######### Update the above two lines with new host id for host1 ############
# Serial number for hostid
EXP_SERIAL_
######### Update host id for below lines##########
# Platform name for hostid
EXP_PLATFORM_NAME_
Save the file and go to bin directory, and execute the explorer command again with below syntax
#explorer -d /Path_to_explorer_config_files/host1 -w default
The Explorer will run without any errors. and collect from output directory.
###############################################################
Solaris 10 Boot-archive Issue during reboot
The boot-archive service, svc:/system/boot-archive, is managed by SMF. This procedure shows how to update the boot archive when an inconsistent archive is detected during the boot process. Clearing the service works the same as running the boot -F failsafe command. Note that when you use this method to update the boot archives, there is no need to boot the failsafe archive or run the bootadm update-archive command. This command runs silently after the boot-archive service has been cleared.
Note : –
The preferred method for correcting an inconsistent boot archive is to boot the system in failsafe mode. See the following references for instructions on booting the failsafe archive:
For SPARC based systems, see Booting a SPARC Based System From the Network.
For x86 based systems, see Booting the Failsafe Archive on an x86 Based System.
1. During the process of booting the system, if a warning similar to the following is displayed, ignore the warning.
WARNING: The following files in / differ from the boot archive:
changed file-name
2. The system will enter system maintenance mode.
3. Clear the boot-archive service by typing the following command:
# svcadm clear system/boot-archive
4. After this command is run, the bootadm update-archive command runs silently. If the boot archive is updated successfully, the system is rebooted.
5. Verify the service is running.
# svcs boot-archive
STATE STIME FMRI
online 9:02:38 svc:/system/boot-archive:default
Example 13–1 SPARC: Updating an inconsistent Boot Archive by Clearing the Boot-Archive Service
screen not found.
Can't open input device.
Keyboard not present. Using ttya for input and output.
Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard
OpenBoot 3.23, 1024 MB memory installed, Serial #13116682.
Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a.
Rebooting with command: boot
Boot device: /pci@1f,4000/scsi@3/disk@1,0:a File and args:
SunOS Release 5.10 64-bit
Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
DEBUG enabled
misc/forthdebug (507204 bytes) loaded
Hostname: marnie
WARNING: The following files in / differ from the boot archive:
changed /kernel/drv/sd.conf
The recommended action is to reboot to the failsafe archive to correct
the above inconsistency. To accomplish this, on a GRUB-based platform,
reboot and select the "Solaris failsafe" option from the boot menu.
On an OBP-based platform, reboot then type "boot -F failsafe". Then
follow the prompts to update the boot archive. Alternately, to continue
booting at your own risk, you may clear the service by running:
"svcadm clear system/boot-archive"
Nov 21 15:47:20 svc.startd[100004]: svc:/system/boot-archive:default: Method
"/lib/svc/method/boot-archive" failed with exit status 95.
Nov 21 15:47:20 svc.startd[100004]: system/boot-archive:default failed fatally:
transitioned to maintenance (see 'svcs -xv' for details)
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
Console login service(s) cannot run
Root password for system maintenance (control-d to bypass):
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode
Nov 21 15:48:36 su: 'su root' succeeded for root on /dev/console
Sun Microsystems Inc. SunOS 5.10,
2007
.
.
.#
#
# svcadm clear system/boot-archive
#
# NIS domain name is mpklab.sfbay.sun.com
/dev/rdsk/c0t1d0s5 is clean
Reading ZFS config: done.
#
# bootadm update-archive
# svcs boot-archive
STATE STIME FMRI
online 9:02:38 svc:/system/boot-archive:default
Note : –
The preferred method for correcting an inconsistent boot archive is to boot the system in failsafe mode. See the following references for instructions on booting the failsafe archive:
For SPARC based systems, see Booting a SPARC Based System From the Network.
For x86 based systems, see Booting the Failsafe Archive on an x86 Based System.
1. During the process of booting the system, if a warning similar to the following is displayed, ignore the warning.
WARNING: The following files in / differ from the boot archive:
changed file-name
2. The system will enter system maintenance mode.
3. Clear the boot-archive service by typing the following command:
# svcadm clear system/boot-archive
4. After this command is run, the bootadm update-archive command runs silently. If the boot archive is updated successfully, the system is rebooted.
5. Verify the service is running.
# svcs boot-archive
STATE STIME FMRI
online 9:02:38 svc:/system/boot-archive:default
Example 13–1 SPARC: Updating an inconsistent Boot Archive by Clearing the Boot-Archive Service
screen not found.
Can't open input device.
Keyboard not present. Using ttya for input and output.
Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard
OpenBoot 3.23, 1024 MB memory installed, Serial #13116682.
Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a.
Rebooting with command: boot
Boot device: /pci@1f,4000/scsi@3/disk@1,0:a File and args:
SunOS Release 5.10 64-bit
Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
DEBUG enabled
misc/forthdebug (507204 bytes) loaded
Hostname: marnie
WARNING: The following files in / differ from the boot archive:
changed /kernel/drv/sd.conf
The recommended action is to reboot to the failsafe archive to correct
the above inconsistency. To accomplish this, on a GRUB-based platform,
reboot and select the "Solaris failsafe" option from the boot menu.
On an OBP-based platform, reboot then type "boot -F failsafe". Then
follow the prompts to update the boot archive. Alternately, to continue
booting at your own risk, you may clear the service by running:
"svcadm clear system/boot-archive"
Nov 21 15:47:20 svc.startd[100004]: svc:/system/boot-archive:default: Method
"/lib/svc/method/boot-archive" failed with exit status 95.
Nov 21 15:47:20 svc.startd[100004]: system/boot-archive:default failed fatally:
transitioned to maintenance (see 'svcs -xv' for details)
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
Console login service(s) cannot run
Root password for system maintenance (control-d to bypass):
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode
Nov 21 15:48:36 su: 'su root' succeeded for root on /dev/console
Sun Microsystems Inc. SunOS 5.10,
2007
.
.
.#
#
# svcadm clear system/boot-archive
#
# NIS domain name is mpklab.sfbay.sun.com
/dev/rdsk/c0t1d0s5 is clean
Reading ZFS config: done.
#
# bootadm update-archive
# svcs boot-archive
STATE STIME FMRI
online 9:02:38 svc:/system/boot-archive:default
Usage of Man Command
To read a manual page for a Unix command, one can use
At a shell prompt: for example, "man ftp". In order to simplify navigation through the output, man generally uses the less terminal pager.Pages are traditionally referred to using the notation "name(section)": for example,
which searches for printf in section 3 of the man pages.
For More Info : http://en.wikipedia.org/wiki/Man_page
man <command_name>
At a shell prompt: for example, "man ftp". In order to simplify navigation through the output, man generally uses the less terminal pager.Pages are traditionally referred to using the notation "name(section)": for example,
ftp(1)
. The same page name may appear in more than one section of the manual, as when the names of system calls, user commands, or macro packages coincide. Examples are man(1)
and man(7)
, or exit(2)
and exit(3)
. The syntax for accessing the non-default manual section varies between different man implementations. On Linux and *BSD, for example, the syntax for reading printf(3)
isman 3 printf
For More Info : http://en.wikipedia.org/wiki/Man_page
Solaris Tunable Parameters
Solaris Kernel Tunable Parameters
- General Kernel and Memory Parameters
- fsflush and Related Parameters
- Process-Sizing Parameters
- Paging-Related Parameters
- Swapping-Related Parameters
- Kernel Memory Allocator
- General Driver Parameter
- General I/O Parameters
- General File System Parameters
- UFS Parameters
- TMPFS Parameters
- Pseudo Terminals
- STREAMS Parameters
- System V Message Queues
- System V Semaphores
- System V Shared Memory
- Scheduling
- Timers
- sun4u or sun4v Specific Parameters
- Solaris Volume Manager Parameters
- Network Driver Parameters
- NFS Tunable Parameters
- Tuning the NFS Environment
- NFS Module Parameters
- nfssrv Module Parameters
- rpcmod Module Parameters
- Internet Protocol Suite Tunable Parameters
- IP Tunable Parameters
- TCP Tunable Parameters
- UDP Tunable Parameters
- IPQoS Tunable Parameter
- SCTP Tunable Parameters
- Per-Route Metrics
Creating file of arbitrary size in Solaris
We use command for testing purpose on FS. I created a file name called "file.500mb" where i need size of 500MB.
Solaris :
# mkfile 500M file.500mb
# du -sh file.500mb
500M file.500mb
bash-3.00# ls -l file.500mb
-rw------T 1 root root 524288000 Feb 17 04:11 file.500mb
We can also do this in other way as below, which creates size of 512MB, we can change the counts/bs depend upon requirement. changing BS will make faster
# dd if=/dev/zero of=/file1g count=500 bs=1024k
500+0 records in
500+0 records out
bash-3.00# du -sh /file1g
500M /file1g
Linux :
Mkfile command will not work, instead we use "dd" command or /dev/urandom as below.
# head -c 1024m /dev/urandom > /fs1/file1g
# du -sh /fs1/file1g
1.1G /fs1/file1g
# cat /dev/urandom /fs1/filename after some times, do ctrl+c to kill,
[OR]
# dd if=/dev/zero of=/fs1/file1g count=500 bs=2048k
500+0 records in
500+0 records out
1048576000 bytes (1.0 GB) copied, 26.3419 seconds, 39.8 MB/s
[root@linux1 admin]# du -sh /fs1/file1g
1001M /fs1/file1g
Solaris :
# mkfile 500M file.500mb
# du -sh file.500mb
500M file.500mb
bash-3.00# ls -l file.500mb
-rw------T 1 root root 524288000 Feb 17 04:11 file.500mb
We can also do this in other way as below, which creates size of 512MB, we can change the counts/bs depend upon requirement. changing BS will make faster
# dd if=/dev/zero of=/file1g count=500 bs=1024k
500+0 records in
500+0 records out
bash-3.00# du -sh /file1g
500M /file1g
Linux :
Mkfile command will not work, instead we use "dd" command or /dev/urandom as below.
# head -c 1024m /dev/urandom > /fs1/file1g
# du -sh /fs1/file1g
1.1G /fs1/file1g
# cat /dev/urandom /fs1/filename after some times, do ctrl+c to kill,
[OR]
# dd if=/dev/zero of=/fs1/file1g count=500 bs=2048k
500+0 records in
500+0 records out
1048576000 bytes (1.0 GB) copied, 26.3419 seconds, 39.8 MB/s
[root@linux1 admin]# du -sh /fs1/file1g
1001M /fs1/file1g
How to Veiw Solaris System Configuration Information
Several tools are available to examine system configuration information. Some tools require superuser privilege. Other tools can be run by a non-privileged user. Every structure and data item can be examined with the kernel debugger by using mdb on a running system or by booting under kmdb.
The sysdef command provides the values of System V IPC settings, STREAMS tunables, process resource limits, and portions of the tune and v structures. For example, the sysdef “Tunable Parameters” section from on Sun Fire 280R with 2GB RAM as below
* Tunable Parameters
42082304 maximum memory allowed in buffer cache (bufhwm)
30000 maximum number of processes (v.v_proc)
99 maximum global priority in sys class (MAXCLSYSPRI)
29995 maximum processes per user id (v.v_maxup)
30 auto update time limit in seconds (NAUTOUP)
25 page stealing low water mark (GPGSLO)
1 fsflush run rate (FSFLUSHR)
25 minimum resident memory for avoiding deadlock (MINARMEM)
25 minimum swapable memory for avoiding deadlock (MINASMEM)
*
The sysdef command provides the values of System V IPC settings, STREAMS tunables, process resource limits, and portions of the tune and v structures. For example, the sysdef “Tunable Parameters” section from on Sun Fire 280R with 2GB RAM as below
* Tunable Parameters
42082304 maximum memory allowed in buffer cache (bufhwm)
30000 maximum number of processes (v.v_proc)
99 maximum global priority in sys class (MAXCLSYSPRI)
29995 maximum processes per user id (v.v_maxup)
30 auto update time limit in seconds (NAUTOUP)
25 page stealing low water mark (GPGSLO)
1 fsflush run rate (FSFLUSHR)
25 minimum resident memory for avoiding deadlock (MINARMEM)
25 minimum swapable memory for avoiding deadlock (MINASMEM)
*
How to get Global Zone name/ip from Local Zone
# hostname
zone1 <<<<< Local Zone
# ifconfig -azone1 <<<<< Local Zone
lo0:1: flags=2001000849
inet 127.0.0.1 netmask ff000000
e1000g0:1: flags=1000843
inet 192.168.1.5 netmask ffffff00 broadcast 192.168.1.255
# arp -a | grep SP
e1000g0 zone1 255.255.255.255 SPLA 00:0c:29:cc:78:c5
e1000g0 10.80.108.75 255.255.255.255 SPLA 00:0c:29:cc:78:c5
#
10.80.108.75 is my Global Zone IP.
Zone : Zone console login
Connecting to zone console from global zone, use the following command as root or the equivalent:
The -C option specifies a console login. The console login will persist when the zone is rebooted.
To exit zlogin, use the escape sequence ~. . If this escape character is inappropriate (i.e. you are connected using software like tip which uses this escape sequence), then you can specify a different escape character on the command line.
For example, to use the $ symbol, use:
Now the zlogin console session can exit by typeing "$." Note : "#" hash is not acceptable
# zlogin -C testzone
The -C option specifies a console login. The console login will persist when the zone is rebooted.
To exit zlogin, use the escape sequence ~. . If this escape character is inappropriate (i.e. you are connected using software like tip which uses this escape sequence), then you can specify a different escape character on the command line.
For example, to use the $ symbol, use:
zlogin -C -e $ testzone
Now the zlogin console session can exit by typeing "$." Note : "#" hash is not acceptable
A TitBit info about Solaris kernel - good one
Solaris Kernel Tuning
sysdef -i
reports on several system resource limits. Other parameters can be checked on a running system using adb -k
: adb -k /dev/ksyms /dev/mem
parameter-name/D
^D
(to exit)
More information on kernel tuning is available in Sun's online documentation. maxusers
maxusers
is the most frequently tuned kernel parameter. Its original use (as an overall limit to the number of concurrent users on a system) is much less important than its role as a basis for calculating other kernel parameters. The default value is set to either the number of MB of physical memory or MAX_DEFAULT_MAXUSERS
, whichever is lower. For Solaris 2.5.1-7,
MAX_DEFAULT_MAXUSERS
is 1024. For Solaris 8-10, MAX_DEFAULT_MAXUSERS
is 2048. maxusers
can be set explicitly in the /etc/system file, but is limited to 2x MAX_DEFAULT_MAXUSERS
. Several key kernel parameters are set when
maxusers
is set unless explicitly overridden in the /etc/system
file. Some of these formulas differ between different versions of Solaris: - max_nprocs: Number of processes =
10 + (16 x maxusers)
- ufs_ninode: Inode cache size =
(17xmaxusers)+90
(Solaris 2.5.1) or4x(maxusers + max_nprocs)+320
(Solaris 2.6-8). See the Disk I/O page for more information. - ncsize: Name lookup cache size =
(17xmaxusers)+90
(Solaris 2.5.1) or4x(maxusers + max_nprocs)+320
(Solaris 2.6-8). See the Disk I/O page for more information. - ndquot: Quota table size =
(maxusers x 10) + max_nprocs
- maxuprc: User process limit =
max_nprocs - 5
ptys
Solaris 8+ dynamically sizes the number of ptys available to a system, so you are less likely to run into pty starvation than was the case under Solaris 2.5.1-7. There are still hard system limits that are set based upon hardware configuration, and it may be necessary to increase the number of ptys manually as in Solaris 2.5.1-7. If the system is suffering from pty starvation, the number of ptys available can be increased by increasingpt_cnt
above the default of 48. Solaris 2.5.1 and 2.6 systems should not have pt_cnt
set higher than 3844 due to limitations with the telnet and rlogin daemons. Solaris 7 does not have this restriction, but there may be other system issues that prevent setting pt_cnt
arbitrarily high. Once pt_cnt
is increased, a reconfiguration boot (boot -r
) is required to build the ptys. If
pt_cnt
is increased, some sources recommend that other variables be set at the same time. Other sources (such as the Solaris2 FAQ) suggest that this advice is spurious and results in a needless consumption of resources. See the notes below before making any of these changes; setting the values too high may result in wasted memory. In any case, one form of these recommendations is:- npty: Set to
pt_cnt
(see the note below) - nautopush: Set to twice the value of
pt_cnt
- sadcnt: Set to same value as
pt_cnt
npty
limits the number of BSD ptys. These are not usually used by applications, but may need to be increased on a system running a special service. In addition to setting npty
in the /etc/system
file, the /etc/iu.ap
file will need to be edited to substitute the value npty-1
in the third field of the ptsl
line. After both changes are made, a boot -r
is required for the changes to take effect. Note that Solaris does not support any more than 176 BSD ptys in any case. sadcnt
sets the number of STREAMS addressable devices and nautopush
sets the number of STREAMS autopush entries. nautopush
should be set to twice sadcnt
. Whether or not these values need to be increased as above depends on the types of activity on the system. RAM Tuneables
See the Memory/Swapping page for a discussion of parameters related to RAM and paging.Disk I/O Tuneables
See the Disk I/O page for a full discussion of disk I/O-related tuneables.IPC Tuneables
Check the IPC Tuning page for InterProcess Communication-related resource parameters.File Descriptors
See the File Descriptors page for more discussion regarding tuning issues. File descriptors are retired when the file is closed or the process terminates. Opens always choose the lowest-numbered file descriptor available. Available file descriptors are allocated as follows:- rlim_fd_cur: It is dangerous to set this value higher than 256 due to limitations with the
stdio
library. If programs require more file descriptors, they should usesetrlimit
directly. - rlim_fd_max: It is dangerous to set this value higher than 1024 due to limitations with
select()
. If programs require more file descriptors, they should usesetrlimit
directly.
poll()
rather than select()
, or are developed as native 64-bit applications. Any changes should be tested in a non-production environment before deployment. The Solaris2 FAQ includes a discussion of this issue.) Misc Tuneables
- dump_cnt: Size of dumps.
- rstchown: Posix/restricted chown enabled (default=1)
- ngroups_max: Maximum number of supplementary groups per user (default=32).
Subscribe to:
Posts (Atom)