Uptime Command in Unix, Linux and Windows

The uptime command can be very useful for troubleshooting system problems. In Windows 7 you can use the systeminfo command and pipe the output to find to cut just the “Time” line out. Older Windows XP systems used to show the actual uptime. Now it just shows the system boot time and you have to do the math.

C:\> systeminfo | find "Time:"
uptime-command-windows-7
Using the systeminfo and | commands to find the uptime of a Windows system--Image Credit: SiliconCali.com
uptime-command-windows-xp
Windows XP gives the system uptime with the systeminfo command--Image Credit: SiliconCali.com

You can also use the ‘systeminfo | more’ command string to give you the full output of your Windows system information with paging so you can use the space bar to page down.

Uptime in Unix is of course more versatile. Here’s the short and concise uptime manpage from Solaris 10 Unix:

sunbox% man uptime

User Commands uptime(1)

NAME
uptime – show how long the system has been up

SYNOPSIS
uptime

DESCRIPTION
The uptime command prints the current time, the length of
time the system has been up, and the average number of jobs
in the run queue over the last 1, 5 and 15 minutes. It is,
essentially, the first line of a w(1) command.

EXAMPLES
Below is an example of the output uptime provides:

example% uptime
10:47am up 27 day(s), 50 mins, 1 user, load average: 0.18, 0.26, 0.20

ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:

____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
| Availability | SUNWcsu |
|_____________________________|_____________________________|

SEE ALSO
w(1), who(1), whodo(1M), attributes(5)

NOTES
who -b gives the time the system was last booted.

SunOS 5.9 Last change: 18 Mar 1994 1

sunbox% who -b
. system boot Nov 9 15:11
sunbox% uptime
5:57pm up 457 day(s), 2:46, 1 user, load average: 0.10, 0.10, 0.09
sunbox%
sunbox% date
Thu Feb 9 17:57:58 PST 2012
sunbox%

Google Chrome for Ice Cream Sandwich Android 4.0

ice cream sandwich android 4.0Google released a beta version of their fast Chrome browser for Android on February 7th. Here’s a quick rundown using the Samsung Nexus Android 4.0 powered phone.

Download in the Android Market. You’ll have to accept Google’s new privacy policy to continue.

When you first open the Chrome browser you are greeted with two floating pointer buttons: “Search the web directly” and “Switch between open tabs”
chrome-android-screenshot.png

Another screenshot:

chrome-android-siliconcali.png
SiliconCali.com on chrome for Android running on the Samsung Nexus

And Chrome for Android in the news:

image

Google’s new chrome for Android browser displays Google news quickly and sharply. While I haven’t done any scientific speed tests yet, the new chrome browser is faster than the default browser that comes with the Samsung Galaxy Nexus.

Google-Ice-Cream-Sandwich-Eclair-Gingerbread-Honeycomb-Statues_SC
Google's Ice Cream Sandwich and a few of his friends enjoying the Mountain View sunshine.

Samsung Galaxy Nexus Screenshot

Screenshot_Samsung_Nexus_SiliconCali
SiliconCali.com Screenshot on the Samsung Nexus phone

The new Samsung Galaxy Nexus Google Phone has the capability to capture screen shots by simply holding the down volume button and power button simultaneously for about 2 seconds. The Android 4.0 Ice Cream Sandwich OS will save the image as a .png file in your phone’s gallery under screenshots for easy on the go blogging, emailing, posting or just capturing the digital moment on your screen. Happy screen capturing!

 

Virgin America-Tech Friendly Airline

Three things you can do on Virgin America that you can’t do on most other air carriers; watch live TV, surf the internet via Wi-Fi, and plug in your AC and USB devices so you can stay juiced up on the flight.

Superbowl_postgame_on_the_plane
Superbowl postgame on the plane

The moving Google map is nice too.

Google_Maps_Virgin_America
Google Maps on Virgin America with purple moodlighting

Rain finally arrives!

imageRain finally arrives in Silicon Valley.

2012 Calendar vs 1752 Calendar in Unix and Leap Years

Happy Ground Hog Day all! This February is the month that gets an extra day added during the leap year of 2012. The Unix ‘cal’ command in Solaris 10 will show you how things can get screwed up if the leap days aren’t added to the calendar every 4 years.

 sunbox% cal 9 1752
 September 1752
 S  M Tu  W Th  F  S
       1  2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Notice anything missing? The calendar we use today had September 1752 adjusted by the British after changing from the Julian calendar to the Gregorian calendar. And you thought changing to a new operating system can create havoc!

From the cal manpage in Solaris 10:

NOTES
An unusual calendar is printed for September 1752. That is
the month 11 days were skipped to make up for lack of leap
year adjustments. To see this calendar, type:

cal 9 1752

If you want to see the calendar for the current month and year, just type cal.

Type cal 3 2012 to see the calendar for March 2012. If you just type cal 3, you will see the full 12 month calendar for the year 3. 2009 years ago, way before Unix Time.Type cal 2012 in the Unix command terminal and you’ll get the full 12 month calendar for the year 2012.

unix-cal-2012-black-binary
Unix command cal 2012 in Solaris

Sh*t Silicon Valley Says

Like she says, I miss seasons.

It’s like Pandora, for cats.

Sun/Oracle ends support for some UltraSPARC processors

So I was asked about upgrading some older Sun/Oracle hardware to Solaris 11. The systems in question are all currently running Solaris 10. Solaris 11 was introduced on November 9, 2011 so it hasn’t been around too long yet. But Solaris 10 has been around since 2005 which makes the Unix OS as old as some of our hardware. The full version of Solaris 11 no longer supports legacy processor architectures UltraSPARC I, II, IIe, III, IIIi, III+, IV and IV+. In the world of Sun/Oracle hardware, these don’t go to 11.

The list of our somewhat dated hardware currently running Solaris 10 includes:

System and Codename

Processor Type and Maximum Number

Sun Netra 440                        Chalupa 19

4x UltraSPARC IIIi

Sun Blade 150                Grover Plus

1x UltraSPARC IIi

Sun Fire V440                 Chalupa

4× UltraSPARC IIIi

Sun Fire V880                 Daktari

8× UltraSPARC III/III+

Sun Fire V890                 Silverstone

8× UltraSPARC IV/IV+

Sun Ultra 45                           Chicago

2x UltraSPARC IIIi

The processors are UltraSPARC IIi, UltraSPARC III/III+ and UltraSPARC IV/IV+, all of which are not supported in the production release of Solaris 11. (They were still supported in the ‘Express’ beta version of Solaris 11 released in November 2010.) Looks we are due for new hardware, which of course is what Larry Ellison wants. Racing sail boats can be expensive. 🙂

If you need to find out what version of Solaris you are running and what type of processors you have, use the uname –a and psrinfo –pv commands.

sunbox% uname -a

SunOS sunbox 5.10 Generic_127111-03 sun4u sparc SUNW,Sun-Fire-880

sunbox% psrinfo -pv

The physical processor has 1 virtual processor (0)

  UltraSPARC-III+ (portid 0 impl 0x15 ver 0xb0 clock 1200 MHz)

The physical processor has 1 virtual processor (2)

  UltraSPARC-III+ (portid 2 impl 0x15 ver 0xb0 clock 1200 MHz)

sunbox%

We are still using old iron in a standalone test environment that doesn’t have to meet the demands of real production servers. At least we aren’t still using the old ‘pizza box’ or the Sun E10K systems from the 1990’s.

Note that If you do try to install Solaris 11 or boot from a Solaris 11 DVD on unsupported hardware, you will get an error similar to this:

Error: 'SUNW,UltraSPARC-IIIi' is not supported by this release of Solaris.
Program terminated
{1} ok

Moving more legacy systems to linux anyone?

Google honors 125th anniversary of largest recorded snowflake with doodle

Despite the lack of winter weather here in the valley, Google brings another snowy themed doodle to their home page. This creative animated art piece honors the 125th anniversary of the largest recorded snowflake that fell on this day in 1887 in Montana. The flakes were said to be 15 inches across! Nothing like that has fallen on the slopes around Lake Tahoe this season.

google_doodle_125th_largest_snowflake

Enjoy this digital remembrance of snow. The forecast doesn’t call for any real snow in the near future.

Living and working in Silicon Valley