• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Friday, 16 Oct 2009 00:14

Since it's Blog Action Day 2009 today, I'd like to remind all the readers of my blog how climate change can be prevented by following really simple rules.

Since Unix Tutorial is a technical blog, I'll try and stay as technical as possible within the topic.

Virtualize to consume less energy, get rid of old hardware

Old servers required a much bigger commitment in the past: not only did they cost a fortune, but they also needed a lot of space and required a lot of power. These days, 1u or 2u server solution can easily outperform a computing system which used to take a whole cabinet in your datacentre. And since the cost of supporting old hardware only increases with each year, it makes a lot of sense to simply but a new server to replace the old infrastructure.

If you're really big into the whole life cycle thing, an even better approach is to virtualize most of your systems. There are quite a few great solutions today – vSphere from VMware, Xen and KVM based virtualization from RedHat and the xVM family of virtualization solutions by Sun Microsystems (Oracle).

A ratio of 15 virtual machines per 1 physical server isn't that uncommon, which can give you an idea about the kind of improvement you'll get by following the route of virtualization.

The math is really simple: shut down 15 old servers, keep only 1 new server running – this means greatly reducing the amount of energy and therefore helping the planet stay green for a bit longer.

Read from your screen, print less

Perhaps on a much smaller scale, the issue of printing materials is also a direction you may want to explore if you're serious about helping the climate change prevention.

Many of us still print dozens of sheets of A4 paper a day. We print out emails and directions, man pages and screenshots – many of these to never be used again.

Start small and pay attention to every urge of yours to print something out. Ask yourself a few simple questions just to be sure that you absolutely need each piece of the information printed out.

As a Unix administrator, you should find ways to monitor your printing service. Even simple things like weekly stats of the top users printing stuff out might sometimes help you save really big on the paper and toner cost. Many users print stuff out without a certain reason for doing so – it's just their habit.

This means that if you're familiar with lpstat and lpadmin commands, you have a chance to help yourself and others become more aware of how much you're printing and what can be done to break your printing patters.

eInk-based book readers are a great alternative for those of you who claim they absolutely can't read off screen. It may be a while until A4-sized readers become widely available and affordable, but already you can get a book reader for just a few hundred dollars and this little device can be used for storing and reading of many books – all without much of an environmental impact, since you no longer need paper books.

Use only what you need

You'll be amazed how much can be saved if you run CPUs on your system at the speed sufficient to fulfill your computational needs instead of having everything running at 100% of their speed!

Many modern servers have power-awareness and intelligence built-in. I especially like blade server solutions – Dell, HP and Sun have all got a range of blade enclosures and blade servers on offer.

The beauty of using blades is that blade enclosures are extremely intelligent and configurable devices – you can use them to cap the power draw for your whole enclosure or a certain blade. Such power limitations will usually result in a lower performance, but for many solutions it's not critical at all. For example, if your blade hosts a FlexLM licenses server or serves web pages, it will be almost impossible to spot a performance difference even if you significantly lower the CPU speed.

Most operating systems support power management options. For desktops, this means ability to manage the speed of your cooling fans or the speed of your CPU which immediately has an impact. Sometimes you can also control your graphics card in the same manner. If you add screen blanking and hard drives management to this (configuring the sleep times for periods of long inactivity), you have all you need to reduce the power draw of your PC and ultimately help our planet stay the way it currently is or maybe even get refreshed over the next few years.

That's it for today! Sure enough, these tips may not seem to be all this climate change preventative, but trust me – we all have to participate with however small steps and environmental improvements we can think of.

See also:

Author: "Gleb Reys" Tags: "News, bad2009, blog action day, climate ..."
Comments Send by mail Print  Save  Delicious 
Date: Friday, 02 Oct 2009 09:07

Hi everyone, it seems to be really long since my last technical post here – too much stuff happening at work, plus I'm studying for a CCNA exam.

If you're in need of quick help – drop me a message on Twitter – I'm UnixTutorial there. I can't promise a prompt reply, but at least this way you'll have some interactivity.

I see how many people leave questions in comments to my posts, and I don't always have the time to reply – so feel free to send me an email if you really need my help.

Author: "Gleb Reys" Tags: "News"
Comments Send by mail Print  Save  Delicious 
Date: Saturday, 29 Aug 2009 07:54
Festival of World Cultures, Dublin

Festival of World Cultures, Dublin

Today is the first day of the 2-day DLR Festival of World Cultures in Dublin.

Festival of World Cultures

The festival is an annual event full of colorful stages with performers from all over the world. There are always many interesting performances, both free and available for a small fee, and every day there is a lot more going on – you can learn more by attending a storytelling session or pick up some unusual art like African hair braiding or drum making or some form of dance.

Particularly popular are fairs and markets set up for the duration of the festival – a great chance to explore the art and food from many countries.

DLR Festival of World Cultures programme

There’s an extensive section of the official festival website,  which is probably the best way to learn more about the festival’s events: DLR Festival of World Cultures Programme 2009.

In addition to it, there’s a downloadable PDF of the festival pocket guide (I’m sure you can also get one once you arrive to the festival). A special events newspaper, Festival Times, is also available for both download (PDF here) and pick up at the location.

If you’re in Dublin this weekend – this is the place to be! And if you’re not – stay tuned for photos!

Author: "admin" Tags: "Arts Events, arts, dublin, festival"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 14 Aug 2009 15:23

Hi everyone!

I'm back from my holidays, and it's time to open the Unix Tutorial members area for new registrations once again!

If you're still looking for a reason to become a member – please read the Becoming a Unix Tutorial member post.

This time around, new users will receive a life-time access to just one course, the Unix foundations one. This is going to be a constantly updated and expanded course so I'm sure you'll benefit from revisiting it now and then. New courses added at a later stage will never be available for free: I plan to make them very specialized and will charge for access – more on this later.

Wait no more – here's your chance to join: Unix Tutorial members sign-up. I don't have nearly as much time to further develop the course, but please take time to leave a comment to this post or update a thread on the Unix Tutorial members discussion board about what exactly you're interested in.

Author: "Gleb Reys" Tags: "News, Unix"
Comments Send by mail Print  Save  Delicious 
Date: Saturday, 27 Jun 2009 19:49
Russian Dolls by Gabriela Kiss

Russian Dolls by Gabriela Kiss

It’s been a wonderful sunny day in Dublin, and we had spent it enjoying a great arts event at Kilruddery House and GardensThe Enchanted Garden.

The Enchanted Garden 2009

The Enchanted Garden is a Kilruddery Arts two-day event curated by Fionnuala Aston-Ardee and Rosie Lynch, taking place on the weekend of June 27th and 28th 2009.

This arts event celebrates creative play and attracts visitors of all ages for the second year in a row. Family oriented, The Enchanted Garden event hosts interactive installations and artist led workshops on the grounds of Kilruddery Gardens.

Food (it was BBQ today) and  drinks (natural juices and tea/coffee)  are available at the new Garden Cafe, and  picnics are also welcome.

Artists at The Enchanted Garden 2009

The following artists have provided installations for this year’s event:

  • Bernardine Carroll
  • Sinead Conlon
  • Roisin Coyle
  • “Culturstruction” (Jo Anne Butler, Tara Kennedy)
  • Fiona Hallinan
  • George Higgs
  • Gabriella Kiss
  • Ruth Lyons
  • Jennie Moran
  • Nina Tanis
  • Kate Warner
  • Jana Zitzmann

The series of interactive installations and participatory activities includes a family of life size Russian dolls, by Hungarian artist Gabriella Kiss; a musical tree by composer George Higgs; and a miniature child’s size version of Killruddery House, designed by visual art/architecture duo “Culturstruction”.

Tickets and opening times for The Enchanted Garden event

Tickets are sold on entrance. You can either get €7 individual one or get a family pass (2 adults and 3 children) for €25.

Opening Time: 12.30 – 5.00 pm

See also:

Author: "admin" Tags: "Arts Events, Entertainment, arts, county..."
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 25 Jun 2009 21:28

Oxegen'09

Oxegen'09

Friday 10th July Saturday 11th July Sunday 12th July

Main Stage

Blur
Snow Patrol
The Script
Lily Allen
James
The Coronas
The Artane Band
Kings of Leon
Bloc Party
Elbow
Yeah Yeah Yeahs
James Morrison
The Blizzards
Squeeze
The Saw Doctors
The Killers
Razorlight
The Specials
Paolo Nutini
Lady Gaga
Calvin Harris
Ocean Colour Scene

Oxegen Stage 2

Keane
Pendulum
Fun Lovin’ Criminals
Duke Special
Therapy?
The Answer
Nick Cave & The Bad Seeds
Doves
The Mars Volta
Maximo Park
Eagles of Death Metal
The Game
The Gaslight Anthem
Nine In Nails
Jane’s Addiction
The Ting Tings
Katy Perry
White Lies
Starsailor
You Me At Six
The Horrors

Heineken Green Spheres

2 Many DJ’s
Republic of Loose
Mogwai
Fight like Apes
Dreadzone
God is an Astronaut
Dirty Epics
Pet Shop Boys
TV on The Radio
Peter Doherty
Regina Spektor
The Saturdays
Daniel Merriweather
Jerry Fish & The Mudbug Club
Gary Go
Manic Street Preachers
Glasvegas
Jason Mraz
Foals
Friendly Fires
That Petrol Emotion
Noisettes
Iglu And Hartly

Red Bull Music Academy

Ladyhawke
M83
David Holmes
Crystal Castles
Tinchy Stryder
Telepathe
Florence And The Machine of Montreal
Casio Kids

Oxegen Dance Arena

Deadmaus
Swedish House Mafia
Crookers
Tom Middleton
Aeroplane (DJSET)
Japanese Popstars
Frankmusik
BURNS
Tiga
Boys Noize
Anie Mac
Digitalism
Yuksek
Dr Lektroluv
Popof
Don Rimini
Felix Da Housecat
Miss Kittin & The Hacker (Live)
Fever Ray
MSTRKRFT
Bloody Beetroots
Hudson Mohawke
Kissy Sell Out

See also:

Author: "admin" Tags: "Music festivals, county kildare, festiva..."
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 23 Jun 2009 23:34
Oxegen'09

Oxegen Festival 2009

Just two weeks from now, Ireland will host the most exciting rock & roll weekend in Europe – Oxegen 2009!

Oxegen music festival

Oxegen is a top class music festival, held every summer in Puncherstown (Naas, County Kildare) since 2004. Although a very young event compared to some other festivals, Oxegen is already one of the most popular and eagerly awaited performance for rock fans all over Europe.

Oxegen 2009 festival will take place during the weekend of July 10th through July 12th.

Oxegen camping

Oxegen’s campsites willl open at 12 noon on Thursday 9th July 2009 to providing various camping facilities to all the fans until the end of the festival. Camping areas will stay open 24 hours every day until 6pm on Monday 13th July.

Campsites correspond to different car parks, so if you plan on camping it probably makes sense to stay in a campsite closer to your car park. The car park pass does not guarantee the camping site preference though, so be sure to arrive early or you will be placed to the camping site available at the time of your arrival, and not necessarily the one closest to your car park.

Oxegen 2009 line up

This year will see some of the greatest bands play at Oxegen, here are just some of the names:

  • Blur
  • Snow Patrol
  • Kings of Leon
  • Nick Cave & The Bad Seeds
  • Nine Inch Nails
  • Lily Allen
  • Katy Perry
    and MANY, MANY more – please click here to look at the current Oxegen 2009 line up.

See also:

Author: "admin" Tags: "Music festivals, county kildare, festiva..."
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 18 Jun 2009 21:53

Dublinia and The Viking World

Dublinia and The Viking World

Dublinia & The Viking World is a heritage centre located in central Dublin, adjacent to the Christ Church Cathedral. Housed in The Synod Hall, this exhibition had been one of the most well-known tourist attractions in Ireland since its opening in 1993. In 2005 the heritage centre saw an addition of The Viking World exhibition, and in 2009 there are plans to renovate both Dublinia exhibitions and expand the centre with another, archaeology based exhibition.

Dublinia

The first of two exhibitions, Dublinia is an interactive world which captures almost 400 years of Dublin’s history – from the Strongbow and his knights in 1170 up to the burning of the monasteries under Henvy VIII in 1540.

Full-scale medieval street and a merchant’s house are the highlights of the exhibition, along with a complete scale model of the medieval town.

The Viking World exhibition

The Viking World explores the Viking era and depicts how vikings first arrived and settled in Ireland.

Many cities of Ireland – Dublin, Waterford, Limerick, Cork and Wexford – were once major trading posts for the early settlers. Thanks to the audio and visual presentation, the Viking World allows you to fully immerse in the imagery and every day life of the early vikings in Ireland.

Dublinia & The Viking World attract tends of thousands of visitors every year, and thanks to the central location of the exhibitions it’s very hard to miss it if you’re staying in Dublin.

The gift shop at Dublinia stocks a wide range of thematic gifts and souvenirs inspired by medieval period.

See also:

Author: "admin" Tags: "Heritage Centres, county dublin, dublin,..."
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 18 Jun 2009 12:11

Although I've already shown you how to sum numbers up in bash, I only covered the bash way of doing it. I really like scripting with bash, but when it comes to calculations, there's quite a few important features missing from bash, and fixed point (thanks for the correction, Azrael Tod!) calculations is one of them. Fortunately, bc command comes as a standard in most Unix distros, and can be used for quite complex calculations.

Basic calculations with bc

bc is a very simple command. It takes standard input as an expression and then evaluates this, performing all the necessary calculations and showing you the result. Thus, to quickly sum numbers up or get a result of some other calculation, simply echo the expression and then pipe it out to the bc command:

ubuntu$ echo "1+2" | bc
3

Now, in scripts your calculations with bc are done quite similarly to what we did in bash. Here's an example:

ubuntu$ NUMBER1=1
ubuntu$ NUMBER2=2
ubuntu$ SUM=$(echo "$NUMBER1+$NUMBER2"| bc)
ubuntu$ echo $SUM
3

I told you these calculations would be basic, right? Now onto the more interesting stuff!

Fixed point calculations with bc

Most people learn about bash math limitations when they attempt to do a simple calculation but can't get the current answer with fixed point values. By default, all the operations happen with integers, and that's what you would get:

ubuntu$ echo "1/2" | bc
0

Now, if you expect 0.5 to be the result of dividing 1 by 2, you need to explain it to bc, because by default it doesn't show you any fractional part of the number.

The way you do this is quite simple: all you have to do is specify the number of digits you'd like to see  after the radix point of your result. For example, if I set this number to 5, I'll get bc to output the result of my calculation with 5 digits after the radix point. The special keyword to convey this intention to the bc command is called scale. Just specify the scale value and separate it from the rest of your expression by the semicolon sign:

ubuntu$ echo "scale=5; 1/2" | bc
.50000

Here's another example:

ubuntu$ echo "scale=5; 0.16*10.79" | bc
1.7264

Hope this answers your question! bc command is very powerful, so I'll definitely have to revisit it again in the future. For now though, enjoy the fixed point calculations and be sure to ask questions if you think I can help!

See also:

Author: "Gleb Reys" Tags: "Basic stuff, Scripts, Unix, bc command, ..."
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 16 Jun 2009 09:21
Adare Manor, Co. Limerick

Adare Manor, Co. Limerick

General information

The Adare Manor Hotel and Golf Resort is a luxury five star hotel located in the Village of Adare, County Limerick, Ireland. The Hotel complex includes the Adare Golf Club, an equestrian centre and a large area of parkland. The Manor was voted Ireland’s Leading Hotel in the 2006 World Travel Award. Adare Manor is home to the Irish Open for 2007, 2008 and 2009.

If you’re looking for a great holiday break in one of the most luxurious destinations in Europe, Adare Manor can well be the one!

Adare Manor 21st birthday special

2009 sees Adare Manor celebrating its 21st birthday, and to mark this occasion the castle hotel offers you a great way to join the celebration: book two of consecutive nights in Adare Manor and you will get a third night absolutely free. The total package price is only €550.00 FOR THREE NIGHTS (based on two people sharing). You can book your Adare Manor stay here.

Main attractions

  • The Cliffs of Moher
  • Ailwee Cave
  • Bunratty Castle
  • Desmond Castle

See also:

Author: "admin" Tags: "Castle Hotels, adare, adare manor, castl..."
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 11 Jun 2009 01:42
Ashford Castle

Ashford Castle

Ashford Castle is a magnificent medieval castle near Cong in Co. Mayo on the shore of Lough Corrib. It is a five star castle hotel, considered to be one of the finest in Ireland.

Ashford Castle brochures: Ashford Castle brochures.

Getting there

Activities

Author: "admin" Tags: "Castle Hotels, ashford, ashford castle, ..."
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 09 Jun 2009 15:24

One of the really useful features almost every Unix shell has is support for command aliases – a way to run a command or a series of Unix commands using a shorter name you get associated with such commands.

An example of a command alias in Unix shell

Here's one of the most useful aliases I have for Solaris systems:

solaris$ alias ls='/usr/local/gnu/bin/ls --color -F'

What is allows me to do is to simply type "ls" instead of the really long command line it refers to: /usr/local/gnu/bin/ls –color -F.

You see, the ls command which is shipped with Solaris, doesn't have many options of the more up-to-date GNU ls command, and working with many Linux systems I quite like some of them like color highlighting of different directory objects – files, directories and executables.

Try typing the longer command a few times in a row, and compare it to the "ls" to get the idea of how much of a productivity gain one command alias can be!

Why you should use command aliases

Like many other things in Unix, aliases are a way to become more productive. The general rule of thumb is this: if you have to run some command something more than once every day – consider creating an alias for it. These are just a few cases where it makes sense to employ them:

  • if you repeatedly check whether some files exist or get updated
  • if you're monitoring a certain aspect of your OS and you get the values using grep command
  • if you're connecting to the same hosts using rsh or ssh

All of these and many more examples are greatly simplified if you alias them to some shorter commands.

Creating new aliases in bash

Setting up a new alias is quite easy, the syntax for alias command is very straightforward. Let's say I want to automate the confirmation of swap usage based on a free command in Linux:

redhat$ free
total       used       free     shared    buffers     cached
Mem:       2075156     945712    1129444          0     177292     503416
-/+ buffers/cache:     265004    1810152
Swap:      2040244          0    2040244

The result I'm after is this command:

redhat$ free | grep Swap
Swap:      2040244          0    2040244

And here's how I can create an alias called "swp" which refers to this series of commands:

redhat$ alias swp='free | grep Swap'

Once you execute this command, you can start using swp as a Unix command:

redhat$ swp
Swap:      2040244          0    2040244

Important: such a creation of new aliases is going to be only active for your current Unix shell and sub-shells you may spawn. To make your alias permanent, you'll have to update one of your initialization scripts like. For Linux and bash, you should add the same alias command to your .bashrc file.

Removing aliases in Unix

In very much the same way, you can use the unalias command to get rid of a certain alias. The nature of this command is such that you'll most likely use it when creating and debugging new aliases. It's unlikely that you'll need to use it in your initialization scripts.

Following the example above, here's how to get rid of the swp alias and verify that it's gone:

redhat$ unalias swp
redhat$ swp
bash: swp: command not found

How to list your current aliases

If you run the alias command without any parameters, you'll be shown a full list of aliases currently configured for your user account, here's an example from one of my systems:

l.      ls -d .* --color=tty
ll      ls -l --color=tty
ls      ls --color=tty
vi      vim

That's it for today! Stay tuned for a follow-up post which will share some of the examples for command aliases in Unix. If you have some – please leave a comment so that I can share it with others!

See also:

Author: "Gleb Reys" Tags: "Basic stuff, Unix"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 09 Jun 2009 00:07

Powerscourt Waterfall

Powerscourt Waterfall

Powerscourt Waterfall is the highest waterfall in Ireland. Located near Enniskerry, Co. Wicklow, it is one of the most thrilling natural attractions found in Ireland today.

The waterfall itself is 130m (425ft) high and is quite magnificent when the weather is right.

Powerscourt Waterfall had been attracting visitors for the past few hundred years, and still stays one of the most popular destinations for anyone visiting Dublin.

A beautiful Dargle Valley surrounding the waterfall is great for walking with plenty of picturesque views and a nature trails, while the base area of the waterfall  is a much loved place for BBQ.

Thanks to the kid’s playground area and refreshments kiosk, Powerscourt Waterfall is a great way for the whole family to enjoy a day out.

Author: "admin" Tags: "Waterfalls, county wicklow"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 15 May 2009 15:38

SSH (Secure SHell) is possibly the best way to remotely access a Unix system – it's very secure thanks to automatic encryption of all the traffic, and it's also quite universal because you can do all sorts of things: access remote command line shell, forward graphics session output, establish network tunnels and set up port redirections. Today I'm going to show you how to get started with SSH in Ubuntu.

Installing SSH server in Ubuntu

By default, your system will have no SSH service enabled, which means you won't be able to connect to it remotely using SSH protocol (TCP port 22). This means that installing SSH server will be one of the first post-install steps on your system.

The most common SSH implementation is OpenSSH server, and that's exactly what you want to install.

Log in with your standard username and password, and run the following command to install openssh-server. You should be using the same username that you specified when installing Ubuntu, as it will be the only account with sudo privileges to run commands as root:

ubuntu$ sudo apt-get install openssh-server
[sudo] password for greys:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  rssh molly-guard openssh-blacklist openssh-blacklist-extra
The following NEW packages will be installed:
  openssh-server
0 upgraded, 1 newly installed, 0 to remove and 75 not upgraded.
Need to get 285kB of archives.
After this operation, 782kB of additional disk space will be used.
Get:1 http://ie.archive.ubuntu.com jaunty/main openssh-server 1:5.1p1-5ubuntu1 [
285kB]
Fetched 285kB in 0s (345kB/s)
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 101998 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a5.1p1-5ubuntu1_i386.deb) .
..
Processing triggers for ufw ...
Processing triggers for man-db ...
Setting up openssh-server (1:5.1p1-5ubuntu1) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
 * Restarting OpenBSD Secure Shell server sshd                           [ OK ]

Verifying your SSH server works

While you're still on your local desktop session, you can use the ps command to confirm that SSH daemon (sshd) is running:

ubuntu$ ps -aef | grep sshd
root     24114     1  0 15:18 ?        00:00:00 /usr/sbin/sshd

Now that you see it's there, it's time to try connecting:

ubuntu$ ssh localhost

Since this is the first time you're trying to connect using SSH, you'll have to answer yes to the following question:

The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is 18:4d:96:b3:0d:25:00:c8:a1:a3:84:5c:9f:1c:0d:a5.
Are you sure you want to continue connecting (yes/no)? yes

… you'll then be prompted for your own password (remember, the system treats such connection request as if you were connecting remotely, so it can't trust you without confirming your password):

Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
greys@localhost's password:

.. and finally you'll see the usual Ubuntu (Jaunty in this example) banner and prompt:

Linux ubuntu 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/

Last login: Fri May 15 15:18:34 2009 from ubuntu
ubuntu$

That's it, providing you have your networking configured and you know your IP address or hostname, you can start connecting to your Ubuntu box from remote systems, using the same command.  Enjoy!

See also:

Author: "Gleb Reys" Tags: "Basic stuff, Linux, Ubuntu, apt-get, ope..."
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 14 May 2009 10:37

As some of you may know already, I've recently restarted my activity on another technical blog of mine: Solaris blog.

Solaris blog: http://solaris.reys.net

Solaris blog is the very first blog I started, I was actively posting new material in 2006-2007.  Since then my primary focus had shifted to Linux systems, but I realized that I miss Solaris so much that I still need to play with latest versions and features in Solaris 10 and OpenSolaris.

Today I'd like to offer you a few articles from Solaris blog, let me know if you find them useful:

Most of these topics are fairly technical and expect you to have previous knowledge of Solaris OS, but Unix Tutorial is here to take care of the basics – so ask away and I'll be glad to help you discover Solaris in my future posts.

Author: "Gleb Reys" Tags: "Advanced topics, Solaris"
Comments Send by mail Print  Save  Delicious 
Date: Monday, 11 May 2009 09:05

show disk size in Unix is a very popular request visitors use to arrive at my Unix Tutorial pages. Since I never addressed the question of confirming the number of hard drivers available on your system or the task of finding out a disk's capacity, I'd like to document a quick and easy way of doing just that.

I hope that when someone looks for a way to show disk size, what's really expected is a command to help you confirm the capacity of a disk in gigabytes.

Using fdisk command in Linux

One of the easiest ways to learn a lot about hard drives installed on your Linux system is to use the fdisk command:suse# fdisk -l

Disk /dev/sda: 145.4 GB, 145492017152 bytes
255 heads, 63 sectors/track, 17688 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         262     2104483+  82  Linux swap / Solaris
/dev/sda2   *         263       17688   139974345   83  Linux

As you can see, there are two sections in the output provided: disk information (capacity and geometry) and disk layout (partitions). The same pattern is repeated if you have more than one disk installed.

What you should look for is the lines starting with "Disk" word: they usually specify the device names for each drive and also provide the capacity in gigabytes. Thus, a time saver would be to grep the necessary information from the command above, this way:

suse# fdisk -l | grep Disk
Disk /dev/sda: 145.4 GB, 145492017152 bytes

On a system with multiple disks, the output will look more useful:

redhat# fdisk -l | grep Disk
Disk /dev/sda: 21.4 GB, 21474836480 bytes
Disk /dev/sdb: 4294 MB, 4294967296 bytes

That's it – a very simple way for you to determine the number of disks in your system while also confirming the capacity available for your needs. fdisk command is actually a very powerful disks management tool which allows you to manage partitions – create and delete them or modify the type of each partition. I will be sure to revisit this command some other time cause usage above doen't do this wonderful Unix command any justice.

See also:

Author: "Gleb Reys" Tags: "Basic stuff, fdisk"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 08 May 2009 08:03

I had to download a piece of software today for one of the servers which I haven't used in a while. A question of confirming the 64bit CPU capability came up, and I realized that I never mentioned it here on Unix Tutorial.

Some of you probably remember the uname command which also shows you similar information, but uname confirms the running kernel of your OS and not the CPU capability: if you're booted into 32bit mode, it will not help you to recognize the 64bit potential of your system.

Obtaining CPU information from /proc/cpuinfo

Most Linux distros will have the special /proc/cpuinfo file which contains a textual description of all the features your processors have. This is a very useful file – depending on your task it may help you identify any features of your processors, as well as confirm the overall number of CPUs your system has installed.

Most commonly, the following information is obtained from /proc/cpuinfo:

  • processor model name and type
  • processor speed in Mhz
  • processor cache size
  • instruction flags supported by CPU

Here's how the typical output will look:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :                   Intel(R) Xeon(TM) CPU 3.20GHz
stepping        : 3
cpu MHz         : 3192.320
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts
acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
bogomips        : 6388.78
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

The same block of information will be shown for each CPU visible to your system. There will be 2 processor instances for each physical CPU if hyper-treading is enabled, and there will be 2 or 4 processor entries for each physical CPU on dual- and quad-core systems configurations.

How to confirm the 64bit capability of your CPU in Linux

Based on /proc/cpuinfo file, it is quite easy to confirm whether your CPU is capable of 64bit or not. All you have to do is look at the flags which tell you what instruction sets your CPU is capable of.

All  the CPUs on your system will have the same type and therefore support the same instruction sets, that's why in this example the grep command returns 4 similar lines – for the 4 CPU instances found on my system:

newserver# grep flags /proc/cpuinfo
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm pni monitor ds_cpl cid cx16 xtpr

What you're looking for is the following flag: lm. It stands for X86_FEATURE_LM, the Long Mode (64bit) support. If you can find the "lm" flag among your CPU flags, this means you're looking at a 64bit capable processor.

As you can see from the example about, the processors in question are 64bit capable.

And this is how /proc/cpuinfo will look on an older system with only 32bit capable CPUs, there's no lm flag as you can see:

oldserver# grep flags /proc/cpuinfo
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm

That's it, hope this little tip helps you next time you're puzzled about your CPU capabilities!

See also:

Author: "Gleb Reys" Tags: "Linux, RedHat, Ubuntu, 64bit, cpuinfo, u..."
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 06 May 2009 20:25

I'm finally getting ready to start publishing some tips with screenshots, so today it's just a humble screenshot tour of my fresh Ubuntu 9.04 install.

Let me know if you struggle with any graphics desktop functionality, and I'll try my best to help and show it with screenshots.

By the way: I really like one of the new community themes which come with Ubuntu 9.04, it's called the Dust theme.

Author: "Gleb Reys" Tags: "News, screenshots, Ubuntu"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 05 May 2009 14:19

Next batch of Unix-related news, this week it's just about announcing all the new releases of various distros.

Unix news

Unix-related releases

  • Wine 1.1.20 released – OLE copy/paste improvements, Direct3D code cleanup and traditional bug fixes

See also:

Author: "Gleb Reys" Tags: "News"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 21 Apr 2009 21:18

Hi all! New posts are coming, but you'll have to wait a bit longer. Here's a few interesting reads you might explore in the meantime:

Unix news

Unix-related releases

Useful Unix tips

See also:

Author: "Gleb Reys" Tags: "News"
Comments Send by mail Print  Save  Delicious 
Next page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader