Pythian has openings for MySQL and MS SQL Server DBAs in each of our offices in
Ottawa, Canada;
Boston, USA;
Dubai, UAE; and
Hyderabad, India. If you are a MySQL and/or SQL Server DBA and would like to evaluate this opportunity, please send us your résumé with an introductory paragraph to
hr@pythian.com.
It recently came up that it would be helpful if we had a cheat sheet to find out the machine names for any given UNIX. I knew these off the top of my head but it would be great if people added more as comments.
HP/HP-UX: /bin/uname -i
IBM/AIX: /bin/uname -m
SGI/IRIX: /sbin/sysinfo -s
Sun/Solaris: /usr/ucb/hostid
These icons link to social bookmarking sites where readers can share and discover new web pages.
You can follow any responses to this post through the
RSS 2.0 feed.
You can leave a response, or
trackback
from your own site.
November 21st, 2007 at 4:19 pm
Linux : uname -n
November 21st, 2007 at 4:51 pm
Thanks Matt! Just to clarify - uname will typically print some system information and things like kernel name, node name processor architechture etc… The “HostID” is like a MAC address for a server in that is unique for each server.
The command for Linux is also: hostid
November 21st, 2007 at 5:18 pm
Don’t forget the Unix Rosetta Stone as a key to things like this. I believe there are more than one of these now, so try a search for it: http://www.google.com/search?q=unix+rosetta+stone .
November 21st, 2007 at 5:21 pm
Great point Dave…
Here is one that I like to refer to as well: http://bhami.com/rosetta.html
-D
November 21st, 2007 at 6:24 pm
I just learned this a month or so ago myself…..On Linux (I haven’t tried on other machines) /etc/issue will give you a more human readable result than uname -a will.
For instance:
> uname -a
Linux hostname 2.4.32-grsec+f6b+gr217+nfs+a32+fuse23+tg+++opt+c8+gr2b-v6.194 #1 SMP [date timezone time] i686 GNU/Linux
> cat /etc/issue
Debian GNU/Linux 3.1 \n \l
The \n and \l as well as other features are described here:
http://www.cyberciti.biz/faq/howto-change-login-message/
Since there are so many flavors of Linux, this can come in handier than uname -a — with uname -a I had a hard time telling the differences among fedora versions.
November 21st, 2007 at 7:47 pm
Sheeri:
/etc/lsb-release should be useful for that, and is less likely to be edited by a system admin. The “lsb” in the filename stands for “Linux Standard Base”; but I’m not sure how widely this file is implemented yet, even in distributions that aim for LSB-compliance.
On my Ubuntu 7.04 box, it reads,
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.04
DISTRIB_CODENAME=feisty
DISTRIB_DESCRIPTION=”Ubuntu 7.04″