Thursday, December 2, 2010



Understanding /proc/cpuinfo

Posted: 02 Dec 2010 02:27 AM PST


$ uname -r

How many physical processors are there?

$ grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l

How many virtual processors are there?

$ grep ^processor /proc/cpuinfo | wc -l

Are the processors dual-core (or multi-core)?

$ grep 'cpu cores' /proc/cpuinfo
cpu cores       : 2
cpu cores       : 2
cpu cores       : 2
cpu cores       : 2

"2" indicates the two physical processors are dual-core, resulting in 4 virtual processors.

If "1" was returned, the two physical processors are single-core. If the processors are single-core, and the number of virtual processors is greater than the number of physical processors, the CPUs are using hyper-threading. Hyper-threading is supported if ht is present in the CPU flags and you are using an SMP kernel.

Are the processors 64-bit?

A 64-bit processor will have lm ("long mode") in the flags section of cpuinfo. A 32-bit processor will not.

flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm cr8legacy ts fid vid ttp tm stc

Changing IP address

Posted: 02 Dec 2010 02:02 AM PST

The following steps may be used to change the IP address of a Solaris system.

  • Change the host's IP in /etc/hosts for the change to take effect after reboot. If you are using Solaris 10, you must also change the host's IP in /etc/inet/ipnodes for the change to take effect after reboot.
  •  Run ifconfig interface ip_address netmask broadcast_address for the IP address change to take effect immediately. The netmask and broadcast_address should be specified if you are using variable length subnet masks (VLSM), but may be omitted otherwise.
  • If you are using variable length subnet masks (VLSM), add the host's network number and subnet mask to /etc/netmasks.
If the new IP address places the system on a different network:
  • Place the host's new default gateway in /etc/defaultrouter
  • Run route add default new_gateway for the new default gateway to take effect immediately.
  • Run route delete default old_gateway to delete the old default gateway from the routing table.

Creating a Flash archive

Posted: 02 Dec 2010 01:29 AM PST

1. If the root disk is encapsulated by Veritas Volume Manager (VxVM), unencapsulate it before continuing.

2. I recommend booting to single-user mode, as you generally do not want to include NFS mounts or other file systems mounted in later run levels as part of your Flash archive.

#reboot -- -s
3. Create the Flash archive.

flarcreate -n name -a author -S -c archive_name
eg: flarcreate -n "Solaris 9 image" -a "shiroy" /var/tmp/sol8.archive

flarcreate will not determine the size of the archive beforehand when using the -S flag. Personally, I have seen flarcreate take an inordinate amount of time calculating the size of the archive.The -c flag enables archive compression via the compress command.

4. If applicable, re-encapsulate the rootdisk with the vxdiskadm command. Reboot the system for the encapsulation to take effect.

NixCraft – Linux Administration

Posted: 02 Dec 2010 01:21 AM PST

Here is a great Linux Admin blog with plenty of content for the both the beginner and the advanced Linux Admin. The name of the blog is nixCraft and it has been in my RSS reader for a while, and I wanted to share with you a couple of the scripts and links that I pulled out and have used.
The first is a quick and easy MySql database backup that you can put in cron to backup your MySql database. Many open source projects use MySql and it always pays to have a backup especially when upgrading, so take a look at this post called backing up your mysql database server.
The second script is a rsync replication script that we can use between a couple of clustered web servers. The script is called resync backup replication script.
And the last example is for the beginner administrator. This post identifies a number of Unix/Linux commands and cheat sheets that was worthwhile to the new administrator.
If you are into Linux from a support or development perspective than I encourage you to take a look at the nixCraft site as I am sure that you will find something useful.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Procedure to clearing the ConfigMgr (SCCM) client local cache (CCM cache) -Resolving Disk space isssue

Essentially the client cache is a temporary download location for software, applications and software updates that are deployed to a clie...