1.21.2015

Use iperf to measure network link bandwidth

Nice writeup on how to use iperf. Another example, writeup.
1. Install iperf
$ sudo yum install iperf

2. Start server on another system:
$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 10.1.1.1 port 5001 connected with 10.0.0.1 port 46699
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.3 sec   107 MBytes  87.7 Mbits/sec

3. Start client from your system specifying server ip:
$ iperf -c 10.1.1.1
------------------------------------------------------------
Client connecting to 10.1.1.1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.1 port 46699 connected with 10.1.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.1 sec   107 MBytes  89.0 Mbits/sec

4. Use options, e.g., -t duration, -i interval between measurements
$ iperf -c 10.1.1.1 -t 20 -i 2
------------------------------------------------------------
Client connecting to 10.1.1.1, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 10.0.0.1 port 46761 connected with 10.1.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 2.0 sec  17.6 MBytes  73.9 Mbits/sec
[  3]  2.0- 4.0 sec  22.5 MBytes  94.4 Mbits/sec
[  3]  4.0- 6.0 sec  21.2 MBytes  89.1 Mbits/sec
[  3]  6.0- 8.0 sec  22.6 MBytes  94.9 Mbits/sec
[  3]  8.0-10.0 sec  22.5 MBytes  94.4 Mbits/sec
[  3] 10.0-12.0 sec  21.2 MBytes  89.1 Mbits/sec
[  3] 12.0-14.0 sec  22.6 MBytes  94.9 Mbits/sec
[  3] 14.0-16.0 sec  22.5 MBytes  94.4 Mbits/sec
[  3] 16.0-18.0 sec  21.2 MBytes  89.1 Mbits/sec
[  3] 18.0-20.0 sec  22.5 MBytes  94.4 Mbits/sec
[  3]  0.0-20.1 sec   217 MBytes  90.6 Mbits/sec

Just want to take note: Bandwidth vs Throughput

Bandwidth : Refers how fast a device can send data over a single communication channel.
Throughput: Refers how fast a device is actually sending data over the communication channel.

1.20.2015

Network 2 ubuntu systems via crossover cable

Got from here.
1. Pick one of the computers to be the server. If one computer has a connection to the Internet use that as the server.

2. On the server click the network indicator and chose "Edit Connections...". Select the Ethernet connection then click the "Edit..." button. Go to the IPv4 tab and change "Method" from "Automatic (DHCP)" to "Shared to other computers".

3. Connect the two computers together using an Ethernet cable. The second computer will get assigned an IP address from the server and get access to the Internet.

If you have old hardware you may need to make sure the Ethernet cable is a crossover cable. Modern hardware automatically does the crossover.
==============================================
hostname:mango, os:Ubuntu 14.10 Utopic Unicorn
==============================================
ASRock Z97 Extreme6 LGA 1150 Intel Z97 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
Intel Core i7-4790 Haswell Quad-Core 3.6GHz LGA 1150 84W Desktop Processor Intel HD Graphics 4600
Team Xtreme 16GB (2 x 8GB) 240-Pin DDR3 SDRAM DDR3 2400 Desktop Memory
OCZ ARC 100 ARC100-25SAT3-240G 2.5" 240GB SATA III MLC Internal Solid State Drive
Western Digital WD Blue WD10EZEX 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive
ENERMAX Ostrog GT ECA3280A-BR Black / Red Steel / Plastic ATX Mid Tower Computer Case

Install and setup Samba on Ubuntu

Got from here.
1. Install samba
$ sudo apt-get update
$ sudo apt-get install samba

2. Set a password for samba user
$ sudo smbpasswd -a samdc
New SMB password:
Retype new SMB password:
Added user samdc.

3. Create a directory to be shared
$ sudo mkdir /data1/staging

4. Make sure user has access
$ sudo chown samdc:samdc /data1/staging

5. Make a backup copy of smb.conf
$ cp /etc/samba/smb.conf ~

6. Edit smb.conf
$ sudo vi /etc/samba/smb.conf
Add this to the very end of the file:
[staging]
path = /data1/staging
available = yes
valid users = samdc
read only = no
browseable = yes
public = yes
writable = yes

7. Restart samba
$ sudo service smbd restart

8. Check smb.conf for any syntax errors
$ testparm

9. To access network share
Linux:
smb://<HOST_IP_OR_NAME>/<folder_name>/
smb://10.42.0.1/staging/

Windows:
\\<HOST_IP_OR_NAME>\<folder_name>\
\\10.42.0.1\staging\

==============================================
hostname:mango, os:Ubuntu 14.10 Utopic Unicorn
==============================================
ASRock Z97 Extreme6 LGA 1150 Intel Z97 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
Intel Core i7-4790 Haswell Quad-Core 3.6GHz LGA 1150 84W Desktop Processor Intel HD Graphics 4600
Team Xtreme 16GB (2 x 8GB) 240-Pin DDR3 SDRAM DDR3 2400 Desktop Memory
OCZ ARC 100 ARC100-25SAT3-240G 2.5" 240GB SATA III MLC Internal Solid State Drive
Western Digital WD Blue WD10EZEX 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive
ENERMAX Ostrog GT ECA3280A-BR Black / Red Steel / Plastic ATX Mid Tower Computer Case

1.07.2015

Prepare FC19 for RabbitMQ development

Got RabbitMQ install from here and here.

Install Erlang

1. $ sudo yum install erlang

Install RabbitMQ from RPM

2. $ sudo rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc 3. $ sudo rpm -Uvh http://www.rabbitmq.com/releases/rabbitmq-server/v3.4.3/rabbitmq-server-3.4.3-1.noarch.rpm (or grab latest here)

Configure RabbitMQ SSL

TODO: outline steps

Install RabbitMQ management console

4. $ sudo rabbitmq-plugins enable rabbitmq_management

Open Firewall

5. $ firewall-cmd --permanent --add-port=5672/tcp 6. $ firewall-cmd --reload 7. $ setsebool -P nis_enabled 1

Start RabbitMQ as a daemon by default

8. $ sudo chkconfig rabbitmq-server on # To start the service: /sbin/service rabbitmq-server start # To stop the service: /sbin/service rabbitmq-server stop # To restart the service: /sbin/service rabbitmq-server restart # To check the status: /sbin/service rabbitmq-server status

Open RabbitMQ management UI

10. Browse to http://localhost:15672/

Install Bunny (Ruby Development)

9. $ gem install bunny Fetching: amq-protocol-1.9.2.gem (100%) Successfully installed amq-protocol-1.9.2 Fetching: bunny-1.6.3.gem (100%) Successfully installed bunny-1.6.3 2 gems installed Enjoy!

1.06.2015

p4 diff output colorizer

Create a ruby file p4c.rb:
#!/usr/local/bin/ruby -w
# encoding: UTF-8
#
# A simply `p4 diff` output colorizer.
# Got this from:
# http://writequit.org/blog/?p=341

FILE_R = /^====\s+([\s\S]+)(#\d+) - ([\s\S]+) ====$/
POS_R  = /^(\d+[ad]\d+)$/
OUT_R  = /^< /
IN_R   = /^> /

## Escape sequences for colors
## Misc
$RESET = "\033[0m"
$BOLD = "\033[1m"
$BLINK = "\033[5m"

## Foreground colors
$BLACK = "\033[30m"
$RED = "\033[31m"
$GREEN = "\033[32m"
$BROWN = "\033[33m"
$BLUE = "\033[34m"
$MAGENTA = "\033[35m"
$CYAN = "\033[36m"
$WHITE = "\033[37m"

$stdin.each_line do |line|
  line.chomp!
  if line =~ FILE_R
    puts "#{$MAGENTA}" + line + "#{$RESET}"
  elsif line =~ POS_R
    puts "#{$CYAN}" + line + "#{$RESET}"
  elsif line =~ OUT_R
    puts "#{$RED}" + line + "#{$RESET}"
  elsif line =~ IN_R
    puts "#{$GREEN}" + line + "#{$RESET}"
  else
    puts line
  end
end
You can call it like this...
$ p4 diff Module.pm | ~/bin/p4c.rb
# or with an alias: colorize='~/bin/p4c.rb'
$ p4 diff Module.pm | colorize

My .aliases

My collection of bash knick knacks.
alias 2proj='cd /auto/home/samdc/projects'

# cd to a directory that is relative to 2proj directory
function 2p() { 2proj && cd $@ ;}

# list resources files
# use: res filename*
function res() { 2proj && cd common/resources/ && ls -l */$@ ; }

# diff color
alias colorize='~/bin/p4c.rb'

1.05.2015

Things to do after installing Ubuntu 14.10 Utopic Unicorn

I got this from here, here, here and here.
1. Enable partner repository
$ sudo sed -i "/^# deb .*partner/ s/^# //" /etc/apt/sources.list && apt-get update

2. Download and Install GetDeb and PlayDeb
$ echo "Downloading GetDeb and PlayDeb" &&
wget http://archive.getdeb.net/install_deb/getdeb-repository_0.1-1~getdeb1_all.deb http://archive.getdeb.net/install_deb/playdeb_0.3-1~getdeb1_all.deb &&
echo "Installing GetDeb" &&
sudo dpkg -i getdeb-repository_0.1-1~getdeb1_all.deb &&
echo "Installing PlayDeb" &&
sudo dpkg -i playdeb_0.3-1~getdeb1_all.deb &&
echo "Deleting Downloads" &&
rm -f getdeb-repository_0.1-1~getdeb1_all.deb &&
rm -f playdeb_0.3-1~getdeb1_all.deb

3. Add PPAs (Personal Package Archives)
$ sudo add-apt-repository -y ppa:videolan/stable-daily
$ sudo add-apt-repository -y ppa:otto-kesselgulasch/gimp
$ sudo add-apt-repository -y ppa:gnome3-team/gnome3
$ sudo add-apt-repository -y ppa:webupd8team/java
$ sudo add-apt-repository -y ppa:webupd8team/y-ppa-manager
$ sudo add-apt-repository -y ppa:transmissionbt/ppa
$ echo 'deb http://download.videolan.org/pub/debian/stable/ /' | sudo tee -a /etc/apt/sources.list.d/libdvdcss.list &&
echo 'deb-src http://download.videolan.org/pub/debian/stable/ /' | sudo tee -a /etc/apt/sources.list.d/libdvdcss.list &&
wget -O - http://download.videolan.org/pub/debian/videolan-apt.asc|sudo apt-key add -

4. Update and upgrade
$ sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

5. Install essentials
$ sudo apt-get install synaptic vlc gimp gimp-data gimp-plugin-registry gimp-data-extras y-ppa-manager bleachbit openjdk-7-jre oracle-java8-installer flashplugin-installer unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview mpeg3-utils mpegdemux liba52-dev mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 totem-mozilla icedax lame libmad0 libjpeg-progs libdvdcss2 libdvdread4 libdvdnav4 ubuntu-restricted-extras ubuntu-wallpapers*

6. Install additional drivers
Open Software & Updates > Additional Drivers, install as needed

7. Install Google Chrome
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb &&
sudo dpkg -i google-chrome-stable_current_amd64.deb &&
rm -f google-chrome-stable_current_amd64.deb

8. Install VirtualBox
Verify if virtualbox packages are included in multiverse repository
$ apt-cache policy virtualbox
virtualbox:
   Installed: (none)
   Candidate: 4.3.18-dfsg-1
   Version table:
   4.3.18-dfsg-1 0
        500 http://in.archive.ubuntu.com/ubuntu/ utopic/multiverse amd64 Packages

Update repository then install
$ sudo add-apt-repository multiverse
$ sudo apt-get update
$ sudo apt-get install virtualbox

9. Install TrueCrypt
To install:
sudo add-apt-repository ppa:stefansundin/truecrypt
sudo apt-get update
sudo apt-get install truecrypt

To automatically grant TrueCrypt sudo powers, edit sudoers with "sudo visudo" and add this (important: add it to the end of the file!):
your_username ALL=(ALL) NOPASSWD:/usr/bin/truecrypt

Using "sudo visudo" makes sure you don't damage the file and prevent your system to boot. Never edit the sudoers file directly. If you're wondering why TrueCrypt exits when you hide it, go to Preferences » Background Task » uncheck "Exit when there are no mounted volumes".

10. Install vim with perl/python/ruby support
$ sudo apt-get remove vim-tiny vim vim-nox
$ sudo apt-get build-dep vim
$ sudo apt-get install mercurial
$ hg clone https://vim.googlecode.com/hg/ vim74
$ cd vim74
$ ./configure --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-cscope  --with-features=huge --prefix=/usr
$ sudo make
$ sudo make install

11. Adjust privacy
System Settings > Security & Privacy
Files & Applications - turn OFF
Search - turn OFF

12. Disable system crash reports
$ sudo vim /etc/default/apport
Change to: enabled=0
$ sudo service apport stop

13. Show menus in window's title bar
System Settings > Appearance > Behavior

14. Change display scale
System Settings ~ Displays ~ Scale for menu and title bars ~ adjust to 0.875

15. Install TweakTools or Unity Tweak Tools
$ sudo apt-get install unity-tweak-tool gnome-tweak-tool
Open Unity Tweak Tool and select "Minimize single window applications on click"

16. Install Skype

17. Install dupeGuru
$ sudo add-apt-repository ppa:hsoft/ppa
$ sudo apt-get update
$ sudo apt-get install dupeguru*

18. Install Unison
$ sudo apt-get install unison unison-gtk

19. To watch silverlight based video streams (HBO Go, etc)
$ sudo add-apt-repository ppa:mjblenner/ppa-hal
$ sudo apt-get update
$ sudo apt-get install hal
$ cd ~/.adobe/Flash_Player
$ rm -rf NativeCache AssetCache APSPrivateData2
$ sudo add-apt-repository ppa:pipelight/stable
$ sudo apt-get update
$ sudo apt-get install --install-recommends pipelight-multi
$ sudo pipelight-plugin --update
$ sudo pipelight-plugin --enable silverlight

20. Card reader support
$ sudo apt-get install exfat-fuse exfat-utils

21. Clean up
echo "Cleaning Up" &&
sudo apt-get -f install &&
sudo apt-get autoremove &&
sudo apt-get -y autoclean &&
sudo apt-get -y clean
==============================================
hostname:mango, os:Ubuntu 14.10 Utopic Unicorn
==============================================
ASRock Z97 Extreme6 LGA 1150 Intel Z97 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
Intel Core i7-4790 Haswell Quad-Core 3.6GHz LGA 1150 84W Desktop Processor Intel HD Graphics 4600
Team Xtreme 16GB (2 x 8GB) 240-Pin DDR3 SDRAM DDR3 2400 Desktop Memory
OCZ ARC 100 ARC100-25SAT3-240G 2.5" 240GB SATA III MLC Internal Solid State Drive
Western Digital WD Blue WD10EZEX 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive
ENERMAX Ostrog GT ECA3280A-BR Black / Red Steel / Plastic ATX Mid Tower Computer Case

Best Way to Check Version of IE?

Just add this to the page...
<!--[if lt IE 9 ]>
<script>
var is_ie_lt9 = true;
</script>
<![endif]-->
Or in my case, I just wanted to display that they are using IE 8, then suggest to use a different browser...
<!--[if lte IE 8]>
    <h2 style="background-color:red;color:white;text-align:center;padding:10px;">You are using Internet Explorer 8 or older.  Please use Firefox or Chrome for proper display of this page.</h2>
<![endif]-->

1.04.2015

Add and Delete Users on Ubuntu 14.10

1. Create user
samdc@mango:~$ sudo adduser raqueldc
[sudo] password for samdc: 
Adding user `raqueldc' ...
Adding new group `raqueldc' (1001) ...
Adding new user `raqueldc' (1001) with group `raqueldc' ...
Creating home directory `/home/raqueldc' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for raqueldc
Enter the new value, or press ENTER for the default
 Full Name []: Raquel
 Room Number []: 
 Work Phone []: 
 Home Phone []: 
 Other []: 
Is the information correct? [Y/n] 

2. Delete user
Delete account:
samdc@mango:~$ sudo userdel newuser
Delete home directory
samdc@mango:~$ sudo rm -rf /home/newuser
==============================================
hostname:mango, os:Ubuntu 14.10 Utopic Unicorn
==============================================
ASRock Z97 Extreme6 LGA 1150 Intel Z97 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
Intel Core i7-4790 Haswell Quad-Core 3.6GHz LGA 1150 84W Desktop Processor Intel HD Graphics 4600
Team Xtreme 16GB (2 x 8GB) 240-Pin DDR3 SDRAM DDR3 2400 Desktop Memory
OCZ ARC 100 ARC100-25SAT3-240G 2.5" 240GB SATA III MLC Internal Solid State Drive
Western Digital WD Blue WD10EZEX 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive
ENERMAX Ostrog GT ECA3280A-BR Black / Red Steel / Plastic ATX Mid Tower Computer Case

Move home dir to another drive

Got it from here.
First install the drive, then follow these steps:
1. Find UUID of the partition
root@mango:~# blkid 
/dev/sdb1: UUID="8b1e1564-d7b6-4ef4-9ffd-d7d191251cc2" TYPE="ext4" PARTUUID="0835b8cd-01"

2. Modify fstab
root@mango:~# vim /etc/fstab
Add this line
UUID=8b1e1564-d7b6-4ef4-9ffd-d7d191251cc2 /media/home          ext4    defaults        0       2

3. Create temporary mount point
root@mango:~# mkdir /media/home

4. Reload fstab
root@mango:~# mount -a

5. Copy /home to new partition
root@mango:~# rsync -aXS --exclude='/*/.gvfs' /home/. /media/home/.

6. Prepare fstab for the switch
root@mango:/home/samdc# vim /etc/fstab
Modify this line to:
UUID=8b1e1564-d7b6-4ef4-9ffd-d7d191251cc2 /home          ext4    defaults        0       2

7. Do the switch
root@mango:~# cd / && sudo mv /home /old_home && sudo mkdir /home

8. Reload fstab
root@mango:/# mount -a

9. Delete old home
root@mango:/# rm -r /old_home

10. Reboot
==============================================
hostname:mango, os:Ubuntu 14.10 Utopic Unicorn
==============================================
ASRock Z97 Extreme6 LGA 1150 Intel Z97 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
Intel Core i7-4790 Haswell Quad-Core 3.6GHz LGA 1150 84W Desktop Processor Intel HD Graphics 4600
Team Xtreme 16GB (2 x 8GB) 240-Pin DDR3 SDRAM DDR3 2400 Desktop Memory
OCZ ARC 100 ARC100-25SAT3-240G 2.5" 240GB SATA III MLC Internal Solid State Drive
Western Digital WD Blue WD10EZEX 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive
ENERMAX Ostrog GT ECA3280A-BR Black / Red Steel / Plastic ATX Mid Tower Computer Case

Install a new hard drive

Got it from here.
1. Partition disk
samdc@mango:/dev$ sudo fdisk /dev/sdc

Welcome to fdisk (util-linux 2.25.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xb73af669.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-1953525167, default 2048): 2048
Last sector, +sectors or +size{K,M,G,T,P} (2048-1953525167, default 1953525167): 

Created a new partition 1 of type 'Linux' and of size 931.5 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

2. Format disk
samdc@mango:/dev$ sudo mkfs -t ext4 /dev/sdc1
mke2fs 1.42.10 (18-May-2014)
Creating filesystem with 244190390 4k blocks and 61054976 inodes
Filesystem UUID: 6dba4379-83fa-4288-b390-98574bc24bb2
Superblock backups stored on blocks: 
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
 102400000, 214990848

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done     

3. Modify reserved space
samdc@mango:/dev$ sudo tune2fs -m 1 /dev/sdc1
tune2fs 1.42.10 (18-May-2014)
Setting reserved blocks percentage to 1% (2441903 blocks)

4. Label disk
samdc@mango:/dev$ sudo e2label /dev/sdc1 DataDisk2

5. Create mount point
samdc@mango:/dev$ sudo mkdir /data2

6. Mount the drive
Automatic mount at boot:
root@mango:/dev# vim /etc/fstab
Add this line (find out UUID of the disk via blkid):
UUID=6dba4379-83fa-4288-b390-98574bc24bb2 /data2           ext4    defaults 0       2
For changes to take effect:
root@mango:/dev# mount -a

Manually mount/unmount:
sudo mount /dev/sdc1 /data2
sudo umount /data2
==============================================
hostname:mango, os:Ubuntu 14.10 Utopic Unicorn
==============================================
ASRock Z97 Extreme6 LGA 1150 Intel Z97 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
Intel Core i7-4790 Haswell Quad-Core 3.6GHz LGA 1150 84W Desktop Processor Intel HD Graphics 4600
Team Xtreme 16GB (2 x 8GB) 240-Pin DDR3 SDRAM DDR3 2400 Desktop Memory
OCZ ARC 100 ARC100-25SAT3-240G 2.5" 240GB SATA III MLC Internal Solid State Drive
Western Digital WD Blue WD10EZEX 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive
ENERMAX Ostrog GT ECA3280A-BR Black / Red Steel / Plastic ATX Mid Tower Computer Case

Find out what disks are in the system

root@mango:/dev# sfdisk -l

Disk /dev/sda: 29185 cylinders, 255 heads, 63 sectors/track
sfdisk: Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+  27135-  27136- 217963520   83  Linux
/dev/sda2      27135+  29185-   2050-  16464897    5  Extended
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty
/dev/sda5      27135+  29185-   2050-  16464896   82  Linux swap / Solaris

Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track

Disk /dev/sdc: 121601 cylinders, 255 heads, 63 sectors/track

root@mango:/dev# lshw -class disk
  *-disk                  
       description: ATA Disk
       product: OCZ-ARC100
       physical id: 0.0.0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: 1.00
       serial: A22L1061449007331
       size: 223GiB (240GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 sectorsize=512 signature=2a960743
  *-disk
       description: ATA Disk
       product: WDC WD10EZEX-00B
       vendor: Western Digital
       physical id: 0.0.0
       bus info: scsi@1:0.0.0
       logical name: /dev/sdb
       version: 1A01
       serial: WD-WCC3F3NFSS65
       size: 931GiB (1TB)
       configuration: ansiversion=5 sectorsize=4096
  *-cdrom
       description: DVD-RAM writer
       product: iHAS124   E
       vendor: ATAPI
       physical id: 0.0.0
       bus info: scsi@3:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/cdrw
       logical name: /dev/dvd
       logical name: /dev/dvdrw
       logical name: /dev/sr0
       version: 4L08
       capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: ansiversion=5 status=nodisc
  *-disk
       description: ATA Disk
       product: WDC WD10EZEX-00B
       vendor: Western Digital
       physical id: 0.0.0
       bus info: scsi@4:0.0.0
       logical name: /dev/sdc
       version: 1A01
       serial: WD-WCC3F1CX4JKE
       size: 931GiB (1TB)
       configuration: ansiversion=5 sectorsize=4096

root@mango:/dev# lsblk -f
NAME   FSTYPE LABEL UUID                                 MOUNTPOINT
sda                                                      
├─sda1 ext4         1987feef-7ad1-4e00-8578-9559d8aff148 /
├─sda2                                                   
└─sda5 swap         c17c259d-e3a8-4220-9f0d-9df4af33fa34 [SWAP]
sdb                                                      
sdc                                                      
sr0                                                      

root@mango:/dev# blkid
/dev/sda1: UUID="1987feef-7ad1-4e00-8578-9559d8aff148" TYPE="ext4" PARTUUID="2a960743-01" 
/dev/sda5: UUID="c17c259d-e3a8-4220-9f0d-9df4af33fa34" TYPE="swap" PARTUUID="2a960743-05" 

root@mango:/dev# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Jan  4 08:24 1987feef-7ad1-4e00-8578-9559d8aff148 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jan  4 08:24 c17c259d-e3a8-4220-9f0d-9df4af33fa34 -> ../../sda5

==============================================
hostname:mango, os:Ubuntu 14.10 Utopic Unicorn
==============================================
ASRock Z97 Extreme6 LGA 1150 Intel Z97 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
Intel Core i7-4790 Haswell Quad-Core 3.6GHz LGA 1150 84W Desktop Processor Intel HD Graphics 4600
Team Xtreme 16GB (2 x 8GB) 240-Pin DDR3 SDRAM DDR3 2400 Desktop Memory
OCZ ARC 100 ARC100-25SAT3-240G 2.5" 240GB SATA III MLC Internal Solid State Drive
Western Digital WD Blue WD10EZEX 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive
ENERMAX Ostrog GT ECA3280A-BR Black / Red Steel / Plastic ATX Mid Tower Computer Case

New System 2015

I built a new system this winter break...

==============================================
hostname:mango, os:Ubuntu 14.10 Utopic Unicorn
==============================================
ASRock Z97 Extreme6 LGA 1150 Intel Z97 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
Intel Core i7-4790 Haswell Quad-Core 3.6GHz LGA 1150 84W Desktop Processor Intel HD Graphics 4600
Team Xtreme 16GB (2 x 8GB) 240-Pin DDR3 SDRAM DDR3 2400 Desktop Memory
OCZ ARC 100 ARC100-25SAT3-240G 2.5" 240GB SATA III MLC Internal Solid State Drive
Western Digital WD Blue WD10EZEX 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive
ENERMAX Ostrog GT ECA3280A-BR Black / Red Steel / Plastic ATX Mid Tower Computer Case