Index syndication
comment syndication

Archive for August, 2007

Solaris tar and changing absolute paths

On linux and other Unix like operating systems, you can untar a tar file with an absolute path to a different location. On Solaris using tar you can not. How do you get around this? Perderabo on the Unix for Advanced and Expert Users forum describes how. Here is an example (names and servers changed to protect the innocent):
  you@yourserver:~ $ tar tvf data_backup.tar
  -rwxrwx--- 13406/1201 2881056 Apr 26 19:29 2007 /apps/server/data/file
  -rwxrwx--- 13406/1201 485376 Apr 26 19:29 2007 /apps/server/data/file.idx
  you@yourserver:~ $ pax -r -s '=^/apps/server=/home/you=' < data_backup.tar
  you@yourserver:~ $ ls -l /home/you/data/
  total 6624
  -rwxr-x---   1 d292462  strata   2881056 Apr 26 19:29 file
  -rwxr-x---   1 d292462  strata    485376 Apr 26 19:29 file.idx

The key is the string given to pax ‘=^/apps/server=/home/you=’. The /apps/server is the path you are replacing and the /home/you is the new path you are forcing tar to untar to. Mix and match as required. But the first string (/apps/server) is the part of the absolute path of each tarred file.

Now get to it.

Clearcase Element Permissions on Unix

I was wondering how to set permissions on an element in clearcase under unix. You can’t just use your normal chmod. After reading “Phil for Humanity” I had the answer:
cleartool protect -chmod 550 myscript.sh
Quite simple after all. Your file, in this case myscript.sh, will now have the permissions you want.
Remember however, if you try to set write permissions on a file element, it wont set. The clearcase man page for protect advises that write perms are ignored - instead to obtain write permission to a file element, it must be checked out.
In the case of a directory element the write permission allows you to create view-private files.
Don’t forget the umask should be set correctly before you start creating files!

Solaris Zombie processes

In Solaris (and UNIX), a process is a zombie, as shown by the message defunct in the ps report. A zombie process is one that has had all its resources freed, but has not received an acknowledgement from a parent process, receipt of which would ordinarily remove its entry from the process table.

The next time a system is booted, zombie processes are cleared. Zombies should not affect system performance, and you should not need to remove them. Only if you start getting a large number, may zombies affect performance as they hold memory resources.

You cannot kill zombies, as they are already dead :-) however from Solaris 9 onwards, there is a tool, preap that may successfully remove zombie processes. Otherwise the only way to kick them off is reboot.

Clearcase Branches Solved?

I think I may have stumbled upon the answer. I’m so set in my CVS ways that I though the best thing was to branch the entire top level folder - recursively. What I really was after was a way of setting the configspec on the NEW view I create for the new branch, and making it show code that is labeled with a particcular label, then when it is checked out and in, a new revision exists on the new branch. The advantage here, is that my new view shows exactly what I need without the need for checking out a version of every file in that view.

This post over at the IBM Rational Clearcase forums describes EXACTLY what I was after, and explained it in the precise terms I needed. I’m thinking differently now, and if it works as I intend, then I shall write further about this adventure into SCM.

Solaris 9 Kernel Parameters

Following up from the last post, you may be interested in a little reading on Sun’s explanation of the semaphore and shared memory settings for Solaris Kernel parameters, using /etc/system.

set semsys:* is for System V Semaphores
set shmsys:* is for System V Shared Memory
set msgsys:* is for System V Message Queues

My personal server OS of choice is OpenBSD, so if you know OpenBSD, then think /etc/sysctl.conf as it is similar.

« Previous entries · Next entries »