IT

HPUX: Restore /etc directory from ignite tape 150 150 Roderick Derks

HPUX: Restore /etc directory from ignite tape

# mkdir cd /tmp/restore_etc
# cd /tmp/restore_etc
# mt -f /dev/rmt/0mn rew (rewind ignite tape)
# mt -f /dev/rmt/0mn fsf 1 (fast forward to right postion on tape)
# tar xvf /dev/rmt/0m etc (restore directory)

NO slash for "etc" -> not /etc

# cp -R -p -i . /etc/
Don't overwrite files by pressing the N key when asked

Another option
# tar xvf /dev/rmt/0m etc/aliases (restore single file)
NO slash for "etc"

Linux bash script for VMware: automated backup vm’s 150 150 Roderick Derks

Linux bash script for VMware: automated backup vm’s

Here is a script that I use to create backups of all of my VM's. There has been some evolution over time so I posted three versions. You can run these script after some adjustments on your VMware host server. For every VM the same routine is followed: stop, copy, start. To complete the backup procedure the backup that just was created is copied to a remote VMware server. So in case of a hardware failure you can start your VM's again on the remote machine. Be aware that this is not a hot backup, the VM's will be switched off.

read more

Using SSH, SCP and RSYNC without a password 150 150 Roderick Derks

Using SSH, SCP and RSYNC without a password

From time to time you want to write scripts that will allow you to copy files to or execute commands on remote systems. You want to execute these scripts without being prompted for a password and you don't want to store the password in the script file. To achieve this we can use ssh encryption keys. read more

Linux: vi quick reference 150 150 Roderick Derks

Linux: vi quick reference

Last Line Mode

Command Mode

Input Mode

Search Functions:

Screen/Line Movement:

Add/Append Text:

/exp                        Go forward to exp

0              Goto line start

a              Append after cursor

?exp                       Go backward to exp

$              Goto line end

A            Append at line end

:5                            Goto line 5

%            Goto matching

I              Insert before cursor

Move and Insert Text:

G             Goto last line

5i             Insert text 5 times

:3,8 d                      Delete line 3-8

 

 

:4,9m 12                  Move line 4-9 to 12

Word Movement:

Add New Lines:

:2,5 t 13                  Copy lines 2-5 to 13

W           Go forward one word

o             Open a line below cursor

:5,9w file                Write line 5-9 to file

3W         Go forward three words

O             Open a line above cursor

 

B             Go back one word

 

Save Files and Exit:

3B           Go back three words

Change Text:

:w                            Write buffer to disk

 

cw           Change a word

:w newfile              Write buffer to newfile

Search Functions:

3cw         Change 3 words

:w! file                    Write absolutely

n             Repeat previous search

C             Change a line

:wq                         Write buffer and quit

N             Reverse previous search

r              Replace one character

:q                            Quit editor

 

R             Replace/Type-over a line

:q!                           Quit, discard buffer

Delete Text:

 

:e!                           Reedit, discard change

x              Delete one character

Screen Movement:

 

dw          Delete one word

^d           Scroll down one half screen

Control Edit Session:

dd           Delete one line

^u           Scroll up one half screen

:set nu                    Display line numbers

D/d$       Delete to end of line

^f            Page forward one page

:set nonu               Turn off line numbers

d0           Delete to begin of line

^b           Page backward one page

:set all                    Show all settings

dG           Delete to end of file

H             Home, top of screen

:set list                   display invisible chars

4dd         Delete 4 lines

M            Middle of screen

 

 

L             Last line of screen

Global Replacement:

Cancel Edit Functions:

 

: %s/string_1/string_2/gc

u             Undo last change

 

:1,$ s/string_1/string_2/g

.               Do last change again

 

Global Delete

 

 

:g/pattern/d

Copy and Insert Text:

 

Read in A File:

Y             Yank a copy of a line

 

:r file_name

5Y           Yank a copy of 5 lines

 

 

P             Put below cursor

 

 

p             Put above cursor

 

 

 

 

 

Word Processing Functions:

 

 

J              Join next line to current

 

 

4J            Join 4 lines to current

 

 

xp            Transposes 2 characters

 

HP-UX Job Queues (Load Average) 150 150 Roderick Derks

HP-UX Job Queues (Load Average)

Job Queues 

The job queue monitor checks the average number of processes that have been waiting for CPU and performing disk I/O over the last 1, 5, or 15 minutes. A value of 4 in /system/jobQueue5Min means that at the time of polling there was an average of 4 jobs in the queue over the last 5 minutes.

The MIB variables computerSystemAvgJobs1, computerSystemAvgJobs5, and computerSystemAvgJobs15 from the hp-unix MIB provides the resource value to the monitor.

To verify the load averages on the system, use the uptime (1) command.

Table 7-3 Interpreting Job Queues

Resource Name

Value Range

Interpretation

/system/jobQueue1Min

integer

average number of jobs in the queue in the last minute

/system/jobQueue5Min

integer

average number of jobs in the queue in the last 5 minutes

/system/jobQueue15Min

integer

average number of jobs in the queue in the last 15 minutes

 

The minimum polling interval is 30 seconds. Unless your system load tends to fluctuate wildly and need load-balancing attention frequently, set a polling interval greater than or equal to the job queue interval: 1, 5, and 15 minutes, respectively.

 

Table 7-5 Examples of System Resource Requests

To be alerted when…

Resources to monitor Monitoring Parameters

Notify

Value

Option

fewer than 5 users are on the node, for running backups

/system/numUsers

when value is

<

5

 

more than 20 users are on the node, for load balancing, and when value returns to below 20 users

/system/numUsers

when value is

>

20

RETURN

system load is high

/system/
jobQueue1Min

when value is

>

7

INITIAL

/system/
jobQueue5Min

when value is

>

4

INITIAL

/system/
jobQueue15Min

when value is

>

3

INITIAL

file systems are running out of space

/system/filesystem/availMb for:
/home
/opt
/root
/stand
/tmp
/usr
/var

when value is

<

50

INITIAL

VMware: Install VMware tools on FC6 guest 150 150 Roderick Derks

VMware: Install VMware tools on FC6 guest

Here is your guide for installing vmware tools on you linux host. I used Fedora Core 6 on the host. Other linux distributions may have different install methodes.

When the VMware tools are installed the VMware server software is able to communicate with the guest. You're able to stop the server from the hosts commandline so you can script complete server backups. And when you shut down the host, the guest os can be shut down first in a correct way. If you have X-Windows installed (or when you are running Windows) you'll see that the performance of the graphics are also much better.

read more

VMware server on a Fedora Core 6 host 150 150 Roderick Derks

VMware server on a Fedora Core 6 host

Installing VMWare server on a Fedora Core 6 host is a pretty simple procedure. There is one bug though. Follow the guidelines and you'll get there. No sweat. Virtualisation will give you a lot of fun. It's my favorite software.. except for Space Invaders. 

read more

NFS setup 150 150 Roderick Derks

NFS setup

Let's setup NFS!
read more

Linux: howto mount iso files 150 150 Roderick Derks

Linux: howto mount iso files

# mkdir /mnt/iso
# mount -o loop -t iso9660 FC3-i386-disc1.iso /mnt/iso

Joomla: howto setup SEO/SEF 150 150 Roderick Derks

Joomla: howto setup SEO/SEF

Using the Artio JoomSEF module I changed my URL's so that the human species can understand them. And also Google likes these much more.

It took a while to get things working, but I finally did it. And so I deserved my beer for today.

read more

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message