Monday, December 01, 2008

Questions when during SA interview

General Unix questions

Here are some quick fire questions that I’ve made use of during the interview process. These are intended to get an idea of their basic knowledge. It can be a bit puzzling that whilst a candidate may know all about the internals of a storage enclosure, they don’t know how to locate a file with a particular name without using grep.

Answers aren’t always given because if you’re conducting an interview on this subject, you should probably know most of the answers

  • What scripting languages do you know? I’d hope for at least one of ksh, bash or csh (roughly in that order: I despise csh mind). Ideally perl will be known to them (see later)
  • What are setuid/setgid in relation to file permissions?
  • What are setuid/setgid in relation to directory permissions?
  • What’s a run level? How do Linux and Solaris Run levels differ? Solaris: What’s /etc/pathtoinst?
  • What does mknod do? What’s a named pipe?
  • How would you shut down a Sun system very quickly? (uadmin) How does it work? (Doesn’t go through run levels)
  • What is an inode?
  • What is a directory?
  • What does init do? What does inetd do?
  • What performance monitoring tools do you use?
  • What’s PGP/GPG; Public/Private Key; Setting up trust
  • What’s ssh? Setting up trust between accounts.
  • X Windowing environment. How’s it differ from others? Setting up X on Windows/Mac’s?
  • What’s VNC?
  • Any database experience?

General questions

Whilst I like to ask open questions that should give plenty of opportunity for the candidate to answer fully, it’s still important to give the candidate a chance to sell themselves. Try some open ended questions such as:

  • What project are you most proud of?
  • What have you achieved which demonstrated overcoming adversity in some form?
  • Where have you learnt the most that improves your skills?
  • Why are you leaving your current job?
  • Why do you want this job?
  • Why should we hire you?
  • Have you heard anything that concerns you?

Some to avoid:

  • Personally, I think there is very very little merit in asking about the minutiae of commands such as sed, grep, awk, sort and other associated Unix command utilities. This is especially so when it comes to command line switches to various commands. I take the view that, so long as somebody knows what the command does, and can give some context, there’s little to be gained by knowing if the candidate knows the “-w” flag in grep searches for whole words. The man pages are there for a purpose, and I’d expect them to use them for such insignificant parts of overall knowledge.

And of course, more personal questions:

  • What do you get up to when you’re not working?
  • I notice you’re from - why did you leave? (I interviewed a lot of antipodes in London, and always like to hear their reasons for travelling, and so on).
  • I see you’re interested in - is it fun? (There’s almost always something of interest to talk about that’s a long way away from technology. Try to find it!)

Don’t forget some obvious ones too, because agencies are often too enthusiastic to e-mail cv’s without checking them:

  • Are you able to work here for the duration of the position?
  • What visa are you on? (Some foreign nationals may have restrictive work visas)
  • Can you provide me with references?

and last, but far from least:

  • Do you have any questions for us?

… It’s a two way process, and you should always give them the opportunity to ask. Don’t assume previous or subsequent interviewers will, but if you’re one of six or seven interviews give them some slack if they’ve asked them all already ;-)

Don’t forget to thank them for coming along too.


http://www.leyton.org/2005/05/20/interviewing-for-unix-system-administrators/

http://www.rogerdarlington.co.uk/Interview.html

About the inode

An inode is a data structure in UNIX operating systems that contains important information pertaining to files within a file system. When a file system is created in UNIX, a set amount of inodes is created, as well. Usually, about 1 percent of the total file system disk space is allocated to the inode table.

Sometimes, people interchange the terms inode and inumber. The terms are similar and do correspond to each other, but they don't refer to the same things. Inode refers to the data structure; the inumber is actually the identification number of the inode—hence the term inode number, or inumber. The inumber is only one important item of information for a file. Some of the other attributes in an inode are discussed in the next section.

The inode table contains a listing of all inode numbers for the respective file system. When users search for or access a file, the UNIX system searches through the inode table for the correct inode number. When the inode number is found, the command in question can access the inode and make the appropriate changes if applicable.

Take, for example, editing a file with vi. When you type vi , the inode number is found in the inode table, allowing you to open the inode. Some attributes are changed during the edit session of vi, and when you have finished and typed :wq, the inode is closed and released. This way, if two users were to try to edit the same file, the inode would already have been assigned to another user ID (UID) in the edit session, and the second editor would have to wait for the inode to be released.

The inode structure

The inode structure is relatively straightforward for seasoned UNIX developers or administrators, but there may still be some surprising information you don't already know about the insides of the inode. The following definitions provide just some of the important information contained in the inode that UNIX users employ constantly:

* Inode number
* Mode information to discern file type and also for the stat C function
* Number of links to the file
* UID of the owner
* Group ID (GID) of the owner
* Size of the file
* Actual number of blocks that the file uses
* Time last modified
* Time last accessed
* Time last changed


http://www.ibm.com/developerworks/aix/library/au-speakingunix14/index.html?ca=drs-

Get information of inode on FreeBSD

> stat -x /bin/sh
File: "/bin/sh"
Size: 112288 FileType: Regular File
Mode: (0555/-r-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ wheel)
Device: 0,91 Inode: 49057 Links: 1
Access: Fri Nov 28 17:50:03 2008
Modify: Tue Jun 3 16:13:27 2008
Change: Tue Jun 3 16:13:27 2008


# fsdb -r /dev/ad14s1a
(...)
fsdb (inum: 2)> inode 49057
current inode: regular file
I=49057 MODE=100555 SIZE=112288
BTIME=Jun 3 16:13:27 2008 [0 nsec]
MTIME=Jun 3 16:13:27 2008 [0 nsec]
CTIME=Jun 3 16:13:27 2008 [0 nsec]
ATIME=Nov 28 17:50:03 2008 [0 nsec]
OWNER=root GRP=wheel LINKCNT=1 FLAGS=0 BLKCNT=dc GEN=2d96bb57
fsdb (inum: 49057)> blocks
Blocks for inode 49057:
Direct blocks:
194536, 194544, 194552, 194560, 194568, 194576, 194632 (7 frags)
fsdb (inum: 49057)>





> find -x / -inum 49057 -exec stat -x {} \;
File: "/bin/sh"
Size: 112288 FileType: Regular File
Mode: (0555/-r-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ wheel)
Device: 0,91 Inode: 49057 Links: 1
Access: Fri Nov 28 18:05:57 2008
Modify: Tue Jun 3 16:13:27 2008
Change: Tue Jun 3 16:13:27 2008

http://forums.freebsd.org/showthread.php?t=628