How to : run sysman in term mode (no graphics) – Utiliser sysman en mode terminal (pas de mode graphique)

Lots of terminal emulator (my favorite is putty) set the graphical display (X11 forwarding).

Beaucoup d’émulateur de terminal (mon préféré est putty) positionnent le display graphique.

If you don’t have X Window System on your Operating System (Cygwin, Xming on Windows for instance) you will have the following message:

Si vous n’avez pas de système X Windows sur votre système d’exploitation (Cygwin, Xming pour Windows par exemple) vous aurez le message suivant :

# sysman
X connection to frsu0203:10.0 broken (explicit kill or server shutdown).

The DISPLAY environment variable was probably set by you terminal emulator:

La variable d’enivrement DISPLAY a probablement été positionnée par l’émulateur de terminal :

# env|grep DISPLAY

So to launch sysman in “no graphics mode”, you just have to unset the variable:

Donc, pour lancer sysman en mode “non graphique”, il faut simplement désaffecter la variable :

# unset DISPLAY
# sysman
                                       SysMan Menu on myhost1
Tru64 UNIX system management tasks:
|>+ Accounts                                                                                         |
| + File Systems                                                                                     |
| + Hardware                                                                                         |
| + Mail                                                                                             |
| + Monitoring and Tuning                                                                            |
| + Networking                                                                                       |
| + Printing                                                                                         |
| + Security                                                                                         |
| + Software                                                                                         |
| + Storage                                                                                          |
| + Support and Services                                                                             |
| + General Tasks                                                                                    |
|                                                                                                    |
|                                                                                                    |
|                                                                                                    |
|                                                                                                    |
                   Select                       Find...                  Help On Item
 Displays help specific to the selected menu item
                    Exit                      Options...                     Help

Use TAB and arrows to navigate, space and ENTER to validate and select.

Utilisez Tab et les fleches pour naviguer, espace et Entrée pour valider et sélectionner.


Speed up WAN file transfer with compression

If you have servers on Wide Area Network (WAN), you may experience very long transfer rates due to limited bandwidth and latency.

To speed up you transfers you need to compress the data so you will have less to transfer.

You can chose to enable ssh compression but if you also have servers on LAN, you will probably slow down those transfer rates.

So the solution is to use a compression tools like gzip or bzip or compress before and after the data transfer.

This is how you can do it with only one command line.

myserver1 has a big file “/tmp/myfile.log” that you want on myservers2.

From myserver2  :

[myserver2]/# ssh myserver1 "gzip -c /tmp/myfile.log" |gunzip > myfile.log

Here is a comparison between a transfer using scp only and a transfer using ssh and gzip.

Transfer with compression is 6 times faster in this case :

# time ssh myserver1 "gzip -c /ORACLE/ora92/network/log/listener.log.myserver1" |gunzip > listener.log.myserver1
real    0m40.040s
user    0m2.159s
sys     0m1.665s
# time scp myserver1:/ORACLE/ora92/network/log/listener.log.myserver1 .
real    4m1.95s
user    0m6.15s
sys     0m5.80s


VI : how to delete lines with- Comment supprimer des lignes avec vi

Go to command mode with <ESC> and type :
Allez dans le mode commande avec <ECH> et taper :


to delete one line.
pour supprimer une ligne.


to delete 12 lines from the current position.
pour supprimer 12 lignes de la position actuelle.


to delete the lines from the current position to the end of the file.
pour supprimer les lignes de la position actuelle jusqu’à la fin du fichier.


to delete from line number 111 to 222 (included).
pour supprimer de la ligne 111 à la ligne 222 (inclus).


to delete all the lines.
pour supprimer toutes les lignes.

Last trick :
Dernière astuce :

:se nu

to print the line numbers on the screen.
pour afficher le numéro des lignes à l’écran.

How to make partitions larger than 2To with parted GPT support

On Unix or Linux I never had to manage LUNs larger than 2To because using LVM I can create very large filesystems with reasonably small LUNs (in general I use LUNs from 256Go to 2To depending on purpose of the filesystem). It’s more convenient to manage “small” LUNs as you arrange them the way you want.

Nevertheless, low cost storage DAS arrays (understand array without SAN like eSATA arrays) sometimes comes with very basic option RAID level, number of disks, period.

In this case I have a SAS array with two RAID 5 volumes, 23To each and I want to make 1 big filesystem with the 2 disks.

Usually I choose fdisk to create partitions but fdisk will fail to manage volumes greater than 2To (MBR limitations).

GPT/EFI partitions:

In order to create larger partitions you have to use GPT (GUID partition table) and EFI partitions.

GPT support must be included in the kernel in order to work with EFI partitions.

A lot of professional Linux distributions embed GPT support by default.

GNU Parted is GPT compatible, so this is how to proceed.


Create the two 23To partitions with parted:

# parted /dev/sdc mklabel gpt
# parted /dev/sdc mkpart primary 1 -1
# parted /dev/sdd mklabel gpt
# parted /dev/sdd mkpart primary 1 -1

(-1 indicate the end of the disk).


# parted dev/sdc print
Model: DELL PERC 6/E Adapter (scsi)
Disk /dev/sdc: 24.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start   End     Size    File system  Name     Flags
1      1049kB  24.0TB  24.0TB               primary
# parted /dev/sdd print
Model: DELL PERC 6/E Adapter (scsi)
Disk /dev/sdd: 24.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start   End     Size    File system  Name     Flags
1      1049kB  24.0TB  24.0TB               primary


LVM and xfs :

Use LVM to aggregate the 2 partitions:

# pvcreate /dev/sdc1 /dev/sdd1
# vgcreate vg_data /dev/sdc1 /dev/sdd1
# lvcreate -l 100%FREE -n lvdata1 vg_data

And create the filesystem :

# mkfs -t xfs /dev/vg_data/lvdata1
# df -h /dev/mapper/vg_data-lvdata1
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/ vg_data-lvdata1
44T  534G   44T   2% /backupst1

I had to use xfs (you will need a license on some professional Linux distributions) because ext4 is limited to 16To filesystems.