Archive for the ‘Solaris’ Category

Sun Solairs Server Commands

November 3rd, 2026, posted in Solaris
Share
# psrinfo -p
2

# psrinfo -pv
The physical processor has 64 virtual processors (0-63)
 UltraSPARC-T2+ (cpuid 0 clock 1165 MHz)
The physical processor has 64 virtual processors (64-127)
 UltraSPARC-T2+ (cpuid 64 clock 1165 MHz)
 

# psrinfo -v | more
Status of virtual processor 0 as of: 08/12/2009 12:01:00
 on-line since 08/08/2009 06:03:02.
 The sparcv9 processor operates at 1165 MHz,
 and has a sparcv9 floating point processor.
Status of virtual processor 1 as of: 08/12/2009 12:01:00
 on-line since 08/08/2009 06:03:05.
 The sparcv9 processor operates at 1165 MHz,
 and has a sparcv9 floating point processor.
Status of virtual processor 2 as of: 08/12/2009 12:01:00
 on-line since 08/08/2009 06:03:05.
 The sparcv9 processor operates at 1165 MHz,
 and has a sparcv9 floating point processor.
.........



Finding cores
To find total number of cores across all the CPUs :

# kstat cpu_info|grep core_id|sort -u|wc -l
 16
 
 
 

 
 
Now to find number of core per CPU simply do the math : total number of cores / total number of physical CPUs

Another way of gathering CPU related info is using the prtdiag command :

# prtdiag -v | more
System Configuration: Oracle Corporation sun4v SPARC T2+
 Memory size: 65536 Megabytes
 
 ================================ Virtual CPUs ================================
 
 
 CPU ID Frequency Implementation Status
 ------ --------- ---------------------- -------
 0 1400 MHz SPARC-T2+ on-line 
 1 1400 MHz SPARC-T2+ on-line 
 2 1400 MHz SPARC-T2+ on-line 
 3 1400 MHz SPARC-T2+ on-line 
 4 1400 MHz SPARC-T2+ on-line 
 5 1400 MHz SPARC-T2+ on-line 
 6 1400 MHz SPARC-T2+ on-line 
 7 1400 MHz SPARC-T2+ on-line 
 8 1400 MHz SPARC-T2+ on-line 
 9 1400 MHz SPARC-T2+ on-line 
 10 1400 MHz SPARC-T2+ on-line 
 11 1400 MHz SPARC-T2+ on-line 
 12 1400 MHz SPARC-T2+ on-line 
 13 1400 MHz SPARC-T2+ on-line 
 14 1400 MHz SPARC-T2+ on-line 
 15 1400 MHz SPARC-T2+ on-line 
 
 ....
 
 
 
 
Gathering Memory information
Getting memory information is trivial. use the prtconf command and grem for Memory :

# prtconf | grep Memory
Memory size: 65536 Megabytes


We can also use the prtdiag command to find the memory in the system :

# prtdiag -v | grep Memory
 Memory size: 65536 Megabytes
 
 
Finding CPU information on T-series hardware with LDOMs
If you have LDOMs installed on the T-series hardware tyhat you have, above commands may not give you the correct values. Use the “ldm list-devices -a” command to list core, virtual CPUs (VCPUs) and resource assignments.

# ldm list-devices -a
CORE ID %FREE CPUSET
 0 12 (0, 1, 2, 3, 4, 5, 6, 7)
 1 0 (8, 9, 10, 11, 12, 13, 14, 15)
 2 0 (16, 17, 18, 19, 20, 21, 22, 23)
 3 0 (24, 25, 26, 27, 28, 29, 30, 31)
 4 0 (32, 33, 34, 35, 36, 37, 38, 39)
 5 0 (40, 41, 42, 43, 44, 45, 46, 47)
 6 0 (48, 49, 50, 51, 52, 53, 54, 55)
 7 0 (56, 57, 58, 59, 60, 61, 62, 63)
 8 0 (64, 65, 66, 67, 68, 69, 70, 71)
 9 0 (72, 73, 74, 75, 76, 77, 78, 79)
 10 0 (80, 81, 82, 83, 84, 85, 86, 87)
 11 0 (88, 89, 90, 91, 92, 93, 94, 95)
 12 0 (96, 97, 98, 99, 100, 101, 102, 103)
 13 0 (104, 105, 106, 107, 108, 109, 110, 111)
 14 0 (112, 113, 114, 115, 116, 117, 118, 119)
 15 0 (120, 121, 122, 123, 124, 125, 126, 127)
 16 0 (128, 129, 130, 131, 132, 133, 134, 135)
...........................


Number of physical cpu:
psrinfo -p


Number of cores:
kstat cpu_info|grep core_id|sort -u|wc -l

Number of threads:
psrinfo -pv
 
# echo "`psrinfo -p` socket(s)"
2 socket(s)

# echo "`kstat -m cpu_info|grep -w core_id|uniq|wc -l` core(s) "
8 core(s)

# echo "`psrinfo|wc -l` logical (virtual) processor(s)" 
64 logical (virtual) processor(s)

Share

ntp Service In Maintenance Mode In Solaris 10

July 5th, 2026, posted in Solaris
Share
Share

Adding and Configuring New Network Interface in Solaris 10

May 19th, 2025, posted in Solaris
Share
ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843 mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 0:c:29:21:12:f5
bash-3.2# ifconfig -a plumb
ifconfig: SIOCSLIFNAME for ip: e1000g0: already exists
bash-3.2#
bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843 mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 0:c:29:21:12:f5
e1000g1: flags=1000842 mtu 1500 index 3
inet 0.0.0.0 netmask 0
ether 0:c:29:21:12:ff
bash-3.2#
bash-3.2# ifconfig e1000g1 10.10.10.1 netmask 255.255.255.0 up
bash-3.2# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843 mtu 1500 index 2
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 0:c:29:21:12:f5
e1000g1: flags=1000843 mtu 1500 index 3
inet 10.10.10.1 netmask ffffff00 broadcast 10.10.10.255
ether 0:c:29:21:12:ff
bash-3.2# ls -ltr /etc/hostname*
-rw-r–r– 1 root root 9 Jan 31 06:12 /etc/hostname.e1000g0
bash-3.2# gedit /etc/hostname.e1000g1
bash-3.2# ls -ltr /etc/hostname*
-rw-r–r– 1 root root 9 Jan 31 06:12 /etc/hostname.e1000g0
-rw-r–r– 1 root root 14 Jan 31 06:46 /etc/hostname.e1000g1
bash-3.2# reboot
Share

Error: Your “crontab” on unexpected end of line. This entry has been ignored

January 20th, 2024, posted in Solaris
Share

Everytime you edit your crontabe file, the error “Your “crontab” on <server> unexpected end of line. This entry has been ignored” is sent to the users email. This happens if there is a blank line in your crontab file.


For instance, in the following crontab file there is a blank line between the last two cron jobs.

root@sunsolaris# crontab -l
# The root crontab should be used to perform accounting data collection.
#
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
#
10 1 * * 0,4 /etc/cron.d/logchecker
10 2 * * 0  /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind

30 4 * * * /usr/local/bin/disk_check,sh
;;;;
;;;
;;
;

To resolve the problem edit the crontab file and look for the blank line and delete the line. In the above, after editing the crontab, it should look lie the follows:

root@sunsolaris# crontab -l
# The root crontab should be used to perform accounting data collection.
#
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
#
10 1 * * 0,4 /etc/cron.d/logchecker
10 2 * * 0  /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
30 4 * * * /usr/local/bin/disk_check,sh
;;;
;;
;

You can see the  blank line removed from the crontab file.

Share