Blog Archives

Configuring Services on RedHat 4

It is not an every day task to configure services on RedHat 4 server.

In case you need add/remove or enable/disable services on RedHat 4 server, try to use utility called system-config-services. This is a GUI interface to manage UNIX services.

See RedHat manual for more information url

How to get number of CPU on Solaris?

Here’s a quick way to find out what hardware is installed in your Solaris system:

    $ /usr/platform/`uname -i`/sbin/prtdiag

Source: [www.lifeaftercoffee.com]

How to create a sparse file on UNIX.

To create a sparse file on UNIX use following command line:

$ dd if=/dev/zero of=<file name> bs=<block size> count=1 seek=<position>

The result of the command line is a file named ‘<file name>’ of a size ‘(position+1)*block size’.

Searching file or directory excluding NFS mounted file systems.

Sometimes I need to find a file or directory on my local machine and I don’t want to scan large NFS file systems connected to my machine.

I am using following syntax for do so:

$ find / -path /net -prune -o -type d -name *gcc*

This command line will search for any directory on my local machine with name included “gcc”. It will not search below “/net”.

You can add any number of “-path … -prune -o” in front of “-type” to add more directories to exclude from search. For example:

$ find / -path /net -prune -o -path /proc -prune -o -type d -name *gcc*

Never reboot a system for stall NFS

This was copied from VentureCake. I keep it here because this is useful information and would be handy.


At some point every Linux admin has had a problem with a computer using a hard-mounted NFS export, where the connecton to the server has been lost – perhaps the network had a problem or the server went down. Any processes which check the status of filesystems – df, rpm, etc. – will hang, waiting on the storage to respond. Next time, you’ll want to mount using the intr option (not soft – see the Linux NFS FAQ). This time, run:

killall -KILL rpciod

rpciod (the kernel process that handles NFS IO), will instantly respawn, sending errors to processes waiting for NFS IO, causing them to respond. If you’re mounting exports from multiple NFS servers and only wish to time out a single connection, you can do so with:

iptables -A OUTPUT -d nfsserver -j REJECT

Within about a minute, the NFS client will decide the server is unreachable. Again, the processes start responding.

You can now unmount the NFS server. No need to reboot.

Benefit: No need to reboot when an NFS mount fails.
Works in: any Linux.
Drawbacks: You can’t disable an individual NFS export, just all the exports from A particular NFS server. Still beats rebooting though.

Enabling ACL supoprt on Tru64 (OSF)

ACL processing is enabled and disabled dynamically using the sysconfig utility or the secconfig menu. To enable ACL processing dynamically using the sysconfig command, enter the following:

# sysconfig -r sec acl_mode=enable

To disable ACL processing dynamically using the sysconfig command, enter the following:

# sysconfig -r sec acl_mode=disable

To view the current ACL processing mode using the sysconfig command, enter the following:

# sysconfig -q sec

To have ACLs enabled automatically as part of system startup, create a stanza file containing the ACL mode enable entry, for example:

sec:
acl_mode = enable

Then use sysconfigdb to add it to the /etc/sysconfigtab file:

# sysconfigdb -m -f acl_mode.stanza sec

On subsequent reboots, ACL processing is enabled automatically.

Source: h30097.www3.hp.com/docs/...

WP Like Button Plugin by Free WordPress Templates