|Mandalika's scratchpad||[ Work blog @Oracle | Stock Market Notes | My Music Compositions ]|
.. with plenty of examples and little comments aside.
 Check existing DNS client configuration
Solaris 11 and later:
% svccfg -s network/dns/client listprop config config application config/value_authorization astring solaris.smf.value.name-service.dns.client config/options astring "ndots:2 timeout:3 retrans:3 retry:1" config/search astring "sfbay.sun.com" "us.oracle.com" "oraclecorp.com" "oracle.com" "sun.com" config/nameserver net_address xxx.xx.xxx.xx xxx.xx.xxx.xx xxx.xx.xxx.xx
Solaris 10 and prior:
Check the contents of /etc/resolv.conf
% cat /etc/resolv.conf search sfbay.sun.com us.oracle.com oraclecorp.com oracle.com sun.com options ndots:2 timeout:3 retrans:3 retry:1 nameserver xxx.xx.xxx.xx nameserver xxx.xx.xxx.xx nameserver xxx.xx.xxx.xx
/etc/resolv.conf file exists on Solaris 11.x releases too as of today.
 Logical domains: finding out the hostname of control domain
root@ppst58-cn1-app:~# virtinfo -a Domain role: LDoms guest I/O service root Domain name: n1d2 Domain UUID: 02ea1fbe-80f9-e0cf-ecd1-934cf9bbeffa Control domain: ppst58-01 Chassis serial#: AK00083297
The above output shows that n1d2 domain is a guest domain, which is also an I/O domain, the service domain and a root I/O domain. Control domain is running on host ppst58-01.
Output from control domain:
root@ppst58-01:~# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME primary active -n-cv- UART 64 130304M 0.1% 0.1% 243d 2h n1d1 active -n---- 5001 448 916992M 0.2% 0.2% 3d 15h 26m n1d2 active -n--v- 5002 512 1T 0.0% 0.0% 3d 15h 29m root@ppst58-01:~# virtinfo -a Domain role: LDoms control I/O service root Domain name: primary Domain UUID: 19337210-285a-6ea4-df8f-9dc65714e3ea Control domain: ppst58-01 Chassis serial#: AK00083297
 Administering NFS configuration
Solaris 11 and later:
sharectl(1M) command. Solaris 11.x releases include the
sharectl administrative tool to configure and manage file-sharing protocols such as NFS, SMB, autofs.
Display all property values of NFS:
# sharectl get nfs servers=1024 lockd_listen_backlog=32 lockd_servers=1024 grace_period=90 server_versmin=2 server_versmax=4 client_versmin=2 client_versmax=4 server_delegation=on nfsmapid_domain= max_connections=-1 listen_backlog=32 .. .. # sharectl status autofs online client nfs disabled
Modifying the nfs v4 grace period from the default 90s to 30s:
# sharectl get -p grace_period nfs grace_period=90 # sharectl set -p grace_period=30 nfs # sharectl get -p grace_period nfs grace_period=30
Solaris 10 and prior:
/etc/default/nfs file, and restart NFS related service(s).
 Examining ZFS Storage Pool command history
Solaris 10 8/07 and later releases log successful
zpool commands that modify the underlying pool state. All those executed commands can be examined by running
zpool history command. Because this command shows the actual zfs commands executed as they are, the 'history' feature is really useful in troubleshooting an error scenario that was resulted from executing some zfs command.
# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 416G 152G 264G 36% 1.00x ONLINE - zs3actact 848G 17.4G 831G 2% 1.00x ONLINE - # zpool history -l zs3actact History for 'zs3actact': 2014-03-19.22:02:32 zpool create -f zs3actact c0t600144F0AC6B9D2900005328B7570001d0 [user root on etc25-appadm05:global] 2014-03-19.22:03:12 zfs create zs3actact/iscsivol1 [user root on etc25-appadm05:global] 2014-03-19.22:03:33 zfs set recordsize=128k zs3actact/iscsivol1 [user root on etc25-appadm05:global]
Note that this log is enabled by default, and cannot be disabled.
 Modifying TCP/IP configuration parameters
ndd(1M) is the old way of tuning TCP/IP parameters, and still supported as of today (in Solaris 11.x releases). However using
padm(1M) command is the recommended way to modify or retrieve TCP/IP Internet protocols on Solaris 11.x and later releases.
# ipadm show-prop -p max_buf tcp PROTO PROPERTY PERM CURRENT PERSISTENT DEFAULT POSSIBLE tcp max_buf rw 1048576 -- 1048576 128000-1073741824 # ipadm set-prop -p max_buf=2097152 tcp # ipadm show-prop -p max_buf tcp PROTO PROPERTY PERM CURRENT PERSISTENT DEFAULT POSSIBLE tcp max_buf rw 2097152 2097152 1048576 128000-1073741824
ndd style (still valid):
# ndd -get /dev/tcp tcp_max_buf 1048576 # ndd -set /dev/tcp tcp_max_buf 2097152 # ndd -get /dev/tcp tcp_max_buf 2097152
One of the advantages of using
ndd is that the configured/tuned non-default values are persistent across reboots. In case of
ndd, we have to re-apply those values either manually or by creating a Run Control script (
/etc/rc*.d/S*) to make sure that the intended values are set automatically during a reboot of the system.
 Writing to system log from a shell script
logger(1) command as shown in the following example.
# logger -p local0.warning Big Brother is watching you # dmesg | tail -1 Mar 30 18:42:14 etc27zadm01 root: [ID 702911 local0.warning] Big Brother is watching you
syslog.conf(4) man page for the list of available system facilities and the severity of the condition being logged (levels).
[*] Forceful NFS unmount on Linux
Try the lazy unmount option (
-l) on systems running Linux kernel 2.4.11 or later to forcefully unmount a filesystem that keeps throwing
Device or resource busy and/or
device is busy error(s).
# umount -f /bkp umount2: Device or resource busy umount: /bkp: device is busy umount2: Device or resource busy umount: /bkp: device is busy # umount -l /bkp #
Final exclusive playlist dedicated for the 80s -- 16 songs -- list dominated by English performers. Enjoy.
Access previous playlists from the following locations:
Blast from the Past : The Weekend Playlist #4 (80s)
Blast from the Past : The Weekend Playlist #3 (80s)
Blast from the Past : The Weekend Playlist #2 (80s)
Blast from the Past : The Weekend Playlist #1 (50s, 60s and 70s)
Audio-Visual material courtesy: YouTube. Other information: Wikipedia.
1. The Rave-Ups - Positively Lost Me (1985)
Featured in movie, Pretty in Pink.
2. Pet Shop Boys - West End Girls (1984)
#1 on Billboard's Hot Dance Music/Club Play chart.
3. Roxy Music - Avalon (1982)
4. Billy Ocean - Caribbean Queen (No More Love On The Run) (1984)
#1 on Billboard Hot 100 singles chart.
5. George Thorogood - Bad to the Bone (1982)
Featured in Terminator 2: Judgment Day.
6. Mike + The Mechanics - The Living Years (1989)
Nominated, but lost the Grammy Song of the Year to Bette Midler's Wind Beneath My Wings.
7. Milli Vanilli - Blame It On The Rain (1989)
Lip-synch'd - but a cool song overall.
8. The Cult - Love Removal Machine (1987)
Named the 74th best hard rock song of all time by VH1. Skip to 0:45s
9. Echo & the Bunnymen - Cutter (1983)
Spare us the cutter.
10. Daryl Hall & John Oates - Maneater (1982)
#1 on Billboard Hot 100 singles for 4 weeks.
11. Soul II Soul - Back to Life (However Do You Want Me) (1989)
12. Peter Gabriel - In Your Eyes (1986)
Promptly featured in the movie, Say Anything...
13. George Michael - Father Figure (1988)
Another #1 song, another English performer.
14. Georgia Satellites - Keep Your Hands To Yourself (1986)
Missed #1 spot by a hair.
15. Murray Head - One Night In Bangkok (1984)
Enjoy. Skip to 0:52s
16. Starship - "Nothing's Gonna Stop Us Now (1987)
#1 on on Billboard Hot 100 singles chart. Featured in movie, Mannequin.
Labels: 80s music playlist
Inflation is the persistent rise in the prices of goods and services in an economy over a period of time, leading to a reduction in the purchasing power as each unit of currency buys fewer goods and services.
Price inflation is measured by the inflation rate, the percentage change of prices calculated on a monthly or annual basis in a price index. Around the world, the Consumer Price Index (CPI) is the most commonly used index to calculate the inflation rate, which measures the price of a representative selection of goods and services for a typical consumer. For example, if the inflation rate is measured at 5%, a loaf of bread that costs $1 today will cost $1.05 in a year.
What causes inflation?
There are at least three theories that are generally accepted.
In a booming economy, strong consumer demand for goods and services may outweigh the aggregate supply and cause the price levels to rise. In other words, if demand is growing faster than supply, prices will increase. This is often referred as Demand-Pull Inflation, a term mostly associated with Keynesian economics.
Most modern asset bubbles including the U.S. housing bubble which peaked in 2006 fall into this category. The increase in the value of Gold in the aftermath of 2008 financial crisis is another example.
An increase in prices of inputs like wages, taxes, imports and raw materials, or other influential factors such as natural disasters, depletion of natural resources, government regulation, change in exchange rates etc., may push the costs of production higher and weaken the supply of goods as it becomes more expensive now to make the same volume as they were before the surge in production costs. While the demand for these goods remain consistent, the shortage in supply causes a rise in the overall price level. In other words, inflation happens when costs increase independently of aggregate demand. This type of inflation is referred as Cost-Push Inflation, another term associated with Keynesian economics.
In 2011, the earthquake and tsunami disaster caused inflation to go up temporarily in deflation-ridden Japan.
As the push for higher federal minimum wages has gained momentum in U.S. these days, the naysayers often cite references to cost-push inflation -- they argue that if the base wages are raised, the manufacturers may feel obligated to pass these increases onto consumers in the form of higher prices.
Over expansion or increase in the money supply in the form of cash and credit may create inflation. If a country prints too much money, the value of the money decreases proportional to the amount of money that was printed. Despite no changes to the aggregate demand or supply, having too much money chasing too few goods can cause the prices of just about everything to increase. If too much money is printed, it becomes worthless to the point where objects are exchanged for goods in place of paper money (bartering).
In year 2000, Zimbabwean Government engaged in money creation activity to fund the Congo war. Coupled with the fact that the money was created with nothing to back it up to give it a value, droughts and private farm confiscation by the government further weakened the supply of food and other locally produced goods. Eventually people holding the Zimbabwean dollar (symbol: Z$) lost confidence in its ability to retain its value, and the series of events that followed led to prolonged hyperinflation between years 2004 and 2009, which ultimately ended with the demise of the Zimbabwean dollar in April 2009. The peak month of hyperinflation occurred in mid-November 2008 with a rate estimated at 79.6 billion percent per month.
Hyperinflation is not purely a monetary phenomenon — massive supply shock often coupled with external debt denominated in a foreign currency may create a situation involving social unrest that give rise to hyperinflation. A supply shock is an event that suddenly changes the price of a commodity or service mostly due to wars or natural disasters. The collapse of the Austro-Hungarian Empire, Yugoslavia, and the Soviet Union all led to the emergence of hyperinflation.
Source: various including investopedia, wikipedia, economicshelp.org, James Montier’s writings
(To be continued ..)
Labels: Economics Inflation
 Solaris 11+ : changing hostname
Starting with Solaris 11, a system's identify (nodename) is configured through the
config/nodename service property of the
svc:/system/identity:node SMF service. Solaris 10 and prior versions have this information in
/etc/nodename configuration file.
The following example demonstrates the commands to change the hostname from "ihcm-db-01" to "ehcm-db-01".eg.,
# hostname ihcm-db-01 # svccfg -s system/identity:node listprop config config application config/enable_mapping boolean true config/ignore_dhcp_hostname boolean false config/nodename astring ihcm-db-01 config/loopback astring ihcm-db-01 # # svccfg -s system/identity:node setprop config/nodename="ehcm-db-01" # svccfg -s system/identity:node refresh -OR- # svcadm refresh svc:/system/identity:node # svcadm restart system/identity:node # svccfg -s system/identity:node listprop config config application config/enable_mapping boolean true config/ignore_dhcp_hostname boolean false config/nodename astring ehcm-db-01 config/loopback astring ehcm-db-01 # hostname ehcm-db-01
 Parallel Compression
This topic is not Solaris specific, but certainly helps Solaris users who are frustrated with the single threaded implementation of all officially supported compression tools such as compress, gzip, zip.
pigz (pig-zee) is a parallel implementation of gzip that suits well for the latest multi-processor, multi-core machines. By default, pigz breaks up the input into multiple chunks of size 128 KB, and compress each chunk in parallel with the help of light-weight threads. The number of compress threads is set by default to the number of online processors. The chunk size and the number of threads are configurable.
Compressed files can be restored to their original form using
-d option of
gzip tools. As per the man page, decompression is not parallelized out of the box, but may show some improvement compared to the existing old tools.
The following example demonstrates the advantage of using
gzip in compressing and decompressing a large file.
Original file, and the target hardware.
$ ls -lh PT8.53.04.tar -rw-r--r-- 1 psft dba 4.8G Feb 28 14:03 PT8.53.04.tar $ psrinfo -pv The physical processor has 8 cores and 64 virtual processors (0-63) The core has 8 virtual processors (0-7) ... The core has 8 virtual processors (56-63) SPARC-T5 (chipid 0, clock 3600 MHz)
$ time gzip --fast PT8.53.04.tar real 3m40.125s user 3m27.105s sys 0m13.008s $ ls -lh PT8.53* -rw-r--r-- 1 psft dba 3.1G Feb 28 14:03 PT8.53.04.tar.gz /* the following prstat, vmstat outputs show that gzip is compressing the tar file using a single thread - hence low CPU utilization. */ $ prstat -p 42510 PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 42510 psft 2616K 2200K cpu16 10 0 0:01:00 1.5% gzip/1 $ prstat -m -p 42510 PID USERNAME USR SYS TRP TFL DFL LCK SLP LAT VCX ICX SCL SIG PROCESS/NLWP 42510 psft 95 4.6 0.0 0.0 0.0 0.0 0.0 0.0 0 35 7K 0 gzip/1 $ vmstat 2 r b w swap free re mf pi po fr de sr s0 s1 s2 s3 in sy cs us sy id 0 0 0 776242104 917016008 0 7 0 0 0 0 0 0 0 52 52 3286 2606 2178 2 0 98 1 0 0 776242104 916987888 0 14 0 0 0 0 0 0 0 0 0 3851 3359 2978 2 1 97 0 0 0 776242104 916962440 0 0 0 0 0 0 0 0 0 0 0 3184 1687 2023 1 0 98 0 0 0 775971768 916930720 0 0 0 0 0 0 0 0 0 39 37 3392 1819 2210 2 0 98 0 0 0 775971768 916898016 0 0 0 0 0 0 0 0 0 0 0 3452 1861 2106 2 0 98
$ time ./pigz PT8.53.04.tar real 0m25.111s <== wall clock time is 25s compared to gzip's 3m 27s user 17m18.398s sys 0m37.718s /* the following prstat, vmstat outputs show that pigz is compressing the tar file using many threads - hence busy system with high CPU utilization. */ $ prstat -p 49734 PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 49734 psft 59M 58M sleep 11 0 0:12:58 38% pigz/66 $ vmstat 2 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr s0 s1 s2 s3 in sy cs us sy id 0 0 0 778097840 919076008 6 113 0 0 0 0 0 0 0 40 36 39330 45797 74148 61 4 35 0 0 0 777956280 918841720 0 1 0 0 0 0 0 0 0 0 0 38752 43292 71411 64 4 32 0 0 0 777490336 918334176 0 3 0 0 0 0 0 0 0 17 15 46553 53350 86840 60 4 35 1 0 0 777274072 918141936 0 1 0 0 0 0 0 0 0 39 34 16122 20202 28319 88 4 9 1 0 0 777138800 917917376 0 0 0 0 0 0 0 0 0 3 3 46597 51005 86673 56 5 39 $ ls -lh PT8.53.04.tar.gz -rw-r--r-- 1 psft dba 3.0G Feb 28 14:03 PT8.53.04.tar.gz $ gunzip PT8.53.04.tar.gz <== shows that the pigz compressed file is compatible with gzip/gunzip $ ls -lh PT8.53* -rw-r--r-- 1 psft dba 4.8G Feb 28 14:03 PT8.53.04.tar
$ time ./pigz -d PT8.53.04.tar.gz real 0m18.068s user 0m22.437s sys 0m12.857s $ time gzip -d PT8.53.04.tar.gz real 0m52.806s <== compare gzip's 52s decompression time with pigz's 18s user 0m42.068s sys 0m10.736s $ ls -lh PT8.53.04.tar -rw-r--r-- 1 psft dba 4.8G Feb 28 14:03 PT8.53.04.tar
Of course, there are other tools such as Parallel BZIP2 (PBZIP2), which is a parallel implementation of the
bzip2 tool are worth a try too. The idea here is to highlight the fact that there are better tools out there to get the job done in a quick manner compared to the existing/old tools that are bundled with the operating system distribution.
 Solaris 11+ : Upgrading SRU
Assuming the package repository is set up already to do the network updates on a Solaris 11+ system, the following commands are helpful in upgrading a SRU.
List all available SRUs in the repository.
# pkg list -af entire
Upgrade to the latest and greatest.
# pkg update
To find out what changes will be made to the system, try a dry run of the system update.
# pkg update -nv
Upgrade to a specific SRU.
# pkg update entire@<FMRI>
Find the Fault Managed Resource Identifier (FMRI) string by running
pkg list -af entire command.
Note that it is not so easy to downgrade SRU to a lower version as it may break the system. Should there be a need to downgrade or switch between different SRUs, relying on Boot Environments (BE) might be a good idea. Check Creating and Administering Oracle Solaris 11 Boot Environments document for details.
 Parallel NFS (pNFS)
Just a quick note — RFC 5661, Network File System (NFS) Version 4.1 introduced a new feature called "Parallel NFS" or pNFS, which allows NFS clients to access storage devices containing file data directly. When file data for a single NFS v4 server is stored on multiple and/or higher-throughput storage devices, using pNFS can result in significant improvement in file access performance. However Parallel NFS is an optional feature in NFS v4.1. Though there was a prototype made available few years ago when OpenSolaris was still alive, as of today, Solaris has no support for pNFS. Stay tuned for any updates from Oracle Solaris teams.
Here is an interesting write-up from one of our colleagues at Oracle|Sun (dated 2007) -- NFSv4.1's pNFS for Solaris.
(Credit to Rob Schneider and Tom Gould for initiating this topic)
 SPARC hardware : Check for and clear faults from ILOM
Couple of ways to check the faults using ILOM command line interface.
show faultycommand from ILOM command prompt, or
fmadm faultycommand from within the ILOM faultmgmt shell
Once found, use the
clear_fault_action property with the
set command to clear the fault for a FRU.
The following example checks for the faulty FRUs from ILOM faultmgmt shell, then clears it out.
-> start /SP/faultmgmt/shell Are you sure you want to start /SP/faultmgmt/shell (y/n)? y faultmgmtsp> fmadm faulty ------------------- ------------------------------------ -------------- -------- Time UUID msgid Severity ------------------- ------------------------------------ -------------- -------- 2014-02-26/16:17:11 18c62051-c81d-c569-a4e6-e418db2f84b4 PCIEX-8000-SQ Critical ... ... Suspect 1 of 1 Fault class : fault.io.pciex.rc.generic-ue Certainty : 100% Affects : hc:///chassis=0/motherboard=0/cpuboard=1/chip=2/hostbridge=4 Status : faulted FRU Status : faulty Location : /SYS/PM1 Manufacturer : Oracle Corporation Name : TLA,PM,T5-4,T5-8 ... Description : A fault has been diagnosed by the Host Operating System. Response : The service required LED on the chassis and on the affected FRU may be illuminated. ... faultmgmtsp> exit -> set /SYS/PM1 clear_fault_action=True Are you sure you want to clear /SYS/PM1 (y/n)? y Set 'clear_fault_action' to 'True'
Note that this procedure clears the fault from the SP but not from the host.
More 80s. Enjoy.
Audio-Visual material courtesy: YouTube. Other information: Wikipedia.
1. Ray Parker, Jr. - Ghostbusters (1984)
Featured in Ghostbusters movie.
2. Chris DeBurgh - Lady In Red (1986)
Not the official video [apparently]. Has nothing to do with the woman in red in The Matrix.
3. Wang Chung - Everybody Have Fun Tonight (1986)
Enjoyed #2 position on the Billboard Hot 100 singles back then.
4. Spandau Ballet - True (1983)
Enjoyed #4 position on the Billboard Hot 100 singles list in the autumn of 1983.
5. Love and Rockets - So alive (1989)
#1 on the Billboard Modern Rock Tracks chart for 5 weeks.
6. John Mellencamp - Hurts So Good (1982)
Another Billboard Hot 100 single in this playlist.
7. Rush- Tom Sawyer (1981)
Featured in numerous hollywood movies, and american telivision shows.
8. After The Fire - Der Kommissar (1982)
Cover for a German song — in English.
9. Midnight Oil - Beds Are Burning (1987)
One Hit Wonder.
10. ZZ Top - Sharp Dressed Man (1983)
Cause every girl is crazy 'bout a sharp dressed man. Really!?
Labels: 80s music playlist