With multicore CPUs it’s easy for newbies to get confused when faced with questions like;
1. How many physical CPUs does the server have?
2. How many cores on each CPU? Duo/Quad
In Linux it’s actually quite easy to get this info.
You could go through the /var/log/dmesg file or the /proc/cpuinfo file. For this tutorial we’ll look at the /proc/cpuinfo file.
Physical CPU count?
Run “cat /proc/cpuinfo | grep “physical id” | sort | uniq | wc -l”.
[root@bender ~]# cat /proc/cpuinfo | grep “physical id” | sort | uniq | wc -l
2
How many cores?
Run “cat /proc/cpuinfo | grep “cpu cores” | uniq”.
[root@kmigb000 ~]# cat /proc/cpuinfo | grep “cpu cores” | uniq
cpu cores       : 2
2 mean that each physical CPU has 2 cores on it. If cpu cores was 1 then the CPU’s single core.
How many virtual processors?
Run “cat /proc/cpuinfo | grep “^processor”"
[root@bender ~]# cat /proc/cpuinfo | grep “^processor”
processor       : 0
processor       : 1
processor       : 2
processor       : 3
That’s about right, 2 physical CPUs x 2 cores each = 4 virtual processeors.
However, it’s a bit different for HT (Hyper-Threading). If you get 
cpu core = 1 but the virtual processors = 2 then the CPU’s running HT. 
HT will only work with the SMP kernel.
Tuesday, November 27, 2012
Good collection of Linux Tutorials
EduChoices published an excellent list of Linux tutorials. The list includes tutorials for Linux newbies and experts alike.
Check it out, a must have if you into Linux The list below was taken from EduChoices.
Check it out, a must have if you into Linux The list below was taken from EduChoices.
Linux and UNIX Training for Beginners
Free Linux Tutorials for Beginners
- Introduction to Linux – This IBM tutorial is designed for people who want to learn what Linux is and how it can be used.
 - Linux Desktop 101 – This 14-week course teaches students how to run the Linux operating system on a PC.
 - Hands-On Introduction to Linux – Machtelt Garrels’ well-organized tutorial provides a hands-on introduction to Linux.
 - Real Time Linux Introduction – A series of introductory Linux tutorials from the National Institute of Standards and Technology.
 - Getting Started with Linux – This 20-lesson course from Linux Online is designed for people who are just getting started with Linux.
 - Linux Fundamentals Course – The Shuttleworth Foundation’s fundamentals course takes approximately 18 hours to complete and gives students a basic understanding of the Linux operating system.
 - The 35-Command Tutorial – This basic Linux tutorial from BeginLinux.org teaches 35 commands that every Linux user should know.
 - Getting Started with Linux Desktop – Novell’s self-study course teaches basic Linux desktop skills.
 
Free UNIX Tutorials for Beginners
- UNIX Tutorial for Beginners – The University of Surrey’s beginner’s guide to the UNIX operating system features eight easy-to-follow tutorials.
 - A Basic UNIX Tutorial – This Idaho State University tutorial teaches the fundamental of UNIX computing. The tutorial includes examples and exercises.
 - UNIX Training Manual – This free 88-page training manual utilizes examples to teach UNIX filesystem commands. Not exactly a tutorial, but useful nevertheless.
 - UNIX Command Tutorial – University of Mississippi course that teaches students how to interact with a UNIX operating system and perform various commands.
 - Learn UNIX Tutorial – Soft Lookup’s comprehensive UNIX tutorial can take almost anyone from a beginner to an expert.
 - UNIX – The Bare Minimum – This tutorial, from a UC Davis professor, offers a basic introduction to UNIX.
 - Learning About UNIX – The University of Toronto offers open access to UNIX and Linux course notes. This course focuses on UNIX and Linux tools.
 - What is UNIX? – This tutorial offers a simple introduction to UNIX and offers access to a forum for UNIX beginners.
 
Linux and UNIX Training for Experts
Free Linux Tutorials for Experts
- Linux Online’s Course for Advanced Users – This advanced course from Linux Online is fashioned into a series of how-to documents. Designed for people who want to learn more about installation, configuration and maintenance tasks.
 - Linux System Administration Course – This 28-module course provides comprehensive training for system administrators.
 - Kernel Tutorials – The kernel tutorials at HowToForge are a great way for Linux users to learn everything they need to know about kernels.
 - Advanced Routing and Traffic Control Tutorial – This advanced Linux tutorial teaches users about routing, filtering and traffic shaping.
 - Linux Enterprise Server Courses – Novell Training Services offers several different courses for advanced Linux users.
 - Linux Network Administration Course – The Shuttleworth Foundation’s Linux Network Administration Course is split into separate tutorials that teach the fundamentals of network administration.
 - Advanced Linux Programming – This tutorial is actually a book that can be downloaded for free. The book teaches users how to develop Linux software and write sophisticated programming.
 - IBM’s Technical Library – IBM’s Technical Library offers a number of useful tutorials for advanced Linux users.
 
Free UNIX Tutorials for Experts
- UNIX for Advanced Users – Indiana University’s UNIX Workstation Support Group offers a great UNIX course for advanced users.
 - Kevin Heard’s UNIX Tutorial – Kevin Heard (UC Berkeley) has a fantastic three-part tutorial that starts with an overview of UNIX and ends with advanced topics.
 - Advanced UNIX Commands – Although this is more of a list than a tutorial, it makes a good reference for advanced UNIX users.
 - Parallel Programming Tutorial – This UNIX tutorial teaches advanced users the ins and outs of parallel programming.
 - Advanced Bash Scripting Guide – This UNIX tutorial from the Linux Document Project starts out with a programming overview and moves on to advanced scripting topics.
 - UNIX Shell Scripting Advanced – VTC has a number of UNIX tutorials that are in video form. This one guides advanced users through their first shell script.
 - Advanced C Shell Programming – This UC Davis tutorial teaches advanced C shell and tcsh programming techniques.
 
Sort files by size
Here’s how to sort files by size in Linux.
Standard;
Reverse;
Options used;
-l –> print long listing
-h –> print human readable sizes
-S –> sort by file size
-r –> reverse order
Output;
Standard;
ls -lhSReverse;
ls -lhSrOptions used;
-l –> print long listing
-h –> print human readable sizes
-S –> sort by file size
-r –> reverse order
Output;
[root@kmon01 log]# ls -lhS
total 70M
-rw-r--r--  1 root     root      36M Mar 31 11:28 messages
-rw-r--r--  1 root     root      15M Mar 31 11:25 cron
-rw-rw-r--  1 root     root      15M Mar 31 04:02 maillog
-rw-rw-r--  1 root     utmp     3.8M Mar 31 11:17 wtmp
-r--------  1 root     root     2.6M Mar 31 11:17 lastlog
-rw-r--r--  1 root     root     1.4M Mar 31 11:13 boot.log
-rw-r--r--  1 root     root      68K Mar 25 04:04 prelink.log
-rw-r--r--  1 root     root      67K May 25  2007 scrollkeeper.log
-rw-r--r--  1 root     root      54K Mar 31 04:02 rpmpkgs
-rw-r--r--  1 root     root      51K Dec 24  2007 xferlog
-rw-r--r--  1 root     root      38K May 25  2007 anaconda.syslog
-rw-r--r--  1 root     root      36K Jun 11  2007 Xorg.0.log
-rw-r--r--  1 root     root      15K Feb  2 10:34 dmesg
-rw-r--r--  1 root     root      13K May 25  2007 anaconda.log[root@kmon01 log]# ls -lhrS
total 70M
-rw-r--r--  1 root     root        0 May 25  2007 spooler
-rw-r--r--  1 root     root        0 Mar 25 14:38 secure
-rwx------  1 postgres postgres    0 May 25  2007 pgsql
-rw-r--r--  1 root     root        0 May 24  2007 mcelog
-rw-r--r--  1 root     root       23 Feb  2 10:35 snmpd.log
-rw-r--r--  1 root     root      715 Sep  1  2009 yum.log
-rw-r--r--  1 mysql    mysql    2.0K Dec  8  2008 mysqld.log
-rw-r--r--  1 root     root     2.1K Feb  2 10:35 acpid
-rw-r--r--  1 root     root     2.7K Mar 22 11:46 btmp
drwxr-xr-x  2 root     root     4.0K Mar 31 11:21 httpd
drwxr-xr-x  2 root     root     4.0K Mar 10  2006 gdm
drwxr-x---  2 exim     exim     4.0K Sep  9  2005 exim
-rw-r--r--  1 root     root      67K May 25  2007 scrollkeeper.log
-rw-r--r--  1 root     root      68K Mar 25 04:04 prelink.log
-rw-r--r--  1 root     root     1.4M Mar 31 11:13 boot.log
-r--------  1 root     root     2.6M Mar 31 11:17 lastlog
-rw-rw-r--  1 root     utmp     3.8M Mar 31 11:17 wtmp
-rw-rw-r--  1 root     root      15M Mar 31 04:02 maillog
-rw-r--r--  1 root     root      15M Mar 31 11:25 cron
-rw-r--r--  1 root     root      36M Mar 31 11:29 messages
How to Fix Ubuntu 10.10 VirtualBox Guest Additions Problems
If you’re trying to run Ubuntu 10.10 Beta on your VirtualBox, you’re 
most likely having issues with the screen resolution. Installing the 
default VirtualBox client doesn’t quite help. Try the steps below,
1. Open terminal and enter the following command:
2. Once installation is finished, restart your VirtualBox machine.
3. Go to System –>Preferences –>Monitors and change the resolution of your screen. You might be able to change the resolution but the screen will re-size properly when you maximize.
1. Open terminal and enter the following command:
#sudo apt-get update
#sudo apt-get install build-essential linux-headers-$(uname -r)
#sudo apt-get install virtualbox-ose-guest-x112. Once installation is finished, restart your VirtualBox machine.
3. Go to System –>Preferences –>Monitors and change the resolution of your screen. You might be able to change the resolution but the screen will re-size properly when you maximize.
How to reset your Gnome desktop
So you messed up the Gnome desktop and don’t know how to restore it back to it’s default settings. Here’s how with no risks.
1. Log out and then hit “Ctrl + ALT + F1″ to opening up a terminal.
2. Delete the following directories.
Or run the this command.
3. “Ctrl + ALT + F7/F8″ and log in as usual.
This guide is based on Ubuntu 10.10
1. Log out and then hit “Ctrl + ALT + F1″ to opening up a terminal.
2. Delete the following directories.
.gnome .gnome2 .gconf .gconfd .metacityOr run the this command.
rm -rf rm -rf .gnome .gnome2 .gconf .gconfd .metacity3. “Ctrl + ALT + F7/F8″ and log in as usual.
This guide is based on Ubuntu 10.10
Restart network service in Ubuntu
Here’s how to restart the network service on Ubuntu without restarting the OS
:~$ sudo /etc/init.d/networking restart
How to install Google Chrome on Fedora 16
Fedora 16 just came out and here’s how to get Google Chrome on it.
Start by creating a repository file for Google called google.repo and place it in /etc/yum.repos.d/ .
Add the lines below into the repository file. google.repo
Update yum,
Search for Google Chrome,
Install Google Chrome Stable
If you prefer the beta like me then run,
Start by creating a repository file for Google called google.repo and place it in /etc/yum.repos.d/ .
sudo vim /etc/yum.repos.d/google.repo
Add the lines below into the repository file. google.repo
[google-chrome]
name=google-chrome - 64-bit
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pubUpdate yum,
sudo yum updateSearch for Google Chrome,
sudo yum search google-chromeInstall Google Chrome Stable
sudo yum install google-chrome-stableIf you prefer the beta like me then run,
sudo yum install google-chrome-beta
Subscribe to:
Comments (Atom)