Hi...
i am trying to ping my servers .The hostnames are present in a file .They are separated by spaces in the file .
i am doing the following :
a=1
for name in $(cat host2 |cut -d" " -f$a)
do
echo Pinging server $name
ping -c5 $name
a=$a+1
done
It is... (3 Replies)
i have these data in a variable "$test"
BUNGA TERATAI 3 5055 ITH 1 1
JADE TRADER 143W ITH 4 4
MOL SPLENDOR 0307A ITH 3 3
the red coloured are the ones that i want to take and compare
what I need to do is to take out the red coloured and then compare to another variable, if same then... (0 Replies)
Hi,
Is it possible to assign one variable to other.
eg.
v1="table1"
v2="20000"
I want table1 to assign 20000
table1=20000
Is there any way?
Thanks (2 Replies)
Hi
I have webserver that I do read data from.
Data are stored like this:
Huston |1
Portland |2
Hazen |1
Minneapolis |4
Albany |1
Pittsburg |1
Albany |1
Huston |1
Portland|1
Hazen |2
Albany |2
Huston |1
Hazen |1
Script #!/bin/sh
user="admin" (1 Reply)
bash-3.00$ cat compare.sh
#NOTE : 1.Filename must not have space for the script to work.
# 2.Script wont work if symlinks are there instead of proper filenames.
#!/bin/bash
#set -x
#############################VERIFYING THE EXISTENCE OF DUPLICATE FILENAMES IN THE SUPPLIED FILENAMES... (3 Replies)
Simple enough problem I think, I just can't seem to get it right.
The below doesn't work as intended, it's just a function defined in a much larger script:
CheckValues() {
for field in \
Group_ID \
Group_Title \
Rule_ID \
Rule_Severity \
... (2 Replies)
I have a group of variables myLINEcnt1 - myLINEcnt10. I'm trying to printout the values using a for loop. I am at the head banging stage since i'm sure it has to be a basic syntax issue that i can't figure out.
For myIPgrp in 1 2 3 4 5 6 7 8 9 10; do
here i want to output the value of... (4 Replies)
Hello guys,
This truly is a newbie question. I'm trying to make a loop to execute simultaneous commands indefinitely while using variable. Here is how my mess looks like (this is just an example):
#!/bin/bash
IP=`shuf -n 1 IP.txt` # I figured this would be easier to select random lines... (4 Replies)
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters". Now... (5 Replies)
Hi All,
I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies
LEARN ABOUT DEBIAN
dtc_write_xenhvm_conf
dtc_write_xenhvm_conf(8) System Manager's Manual dtc_write_xenhvm_conf(8)NAME
dtc_write_xenhvm_conf - rewrites the xen startup script with selected params
SYNOPSIS
dtc_write_xenhvm_conf VPS_NUMBER MEMORY_SIZE ALL_IP_ADDRESSES VNC_CONSOLE_PASSWORD HOW_TO_BOOT
DESCRIPTION
dtc_write_xenhvm_conf This shell script is a part of the dtc-xen package that is to be used by the dtc panel to manage a Xen VPS server.
This script generate a Xen startup file with the parameters given to the script.
PARAMETERS
Note that ALL parameters are mendatory.
VPS_NUMBER has to be a number between 01 and 29
MEMORY_SIZE is the amount of memory in mega bytes that you want to have setup in the Xen startup file for this VPS
ALL_IP_ADDRESSES is a list of IPs that you want to be set in the VM's startup file and in the VM's configuration. Note that the IPs have to
be separated by spaces, and thus you might want to use single quotes like this: '1.2.3.4 1.2.3.5'. Note that only the first IP will be set
in the VM's configuration, but the list will be set in the Xen startup file so you can use the anti-spoofing facilities of Xen if you need
it (with untrusted users / unknown customers for example).
VNC_CONSOLE_PASSWORD This is the VNC console password that you want to have set-up in the Xen domU configuration file, so that you can con-
nect using VNC to the the setup. Note that special value no_vnc can be used to declare that you do not want the VNC console to be used at
all.
HOW_TO_BOOT This controls what the VPS will use to boot. A special value of hdd can be used to tell dtc_write_xenhvm_conf that you want to
boot on the hard drive of the domU. Any other parameters will be used as a .iso file located in /var/lib/dtc-xen/ttyssh_home/xenXX where
xenXX equals to the VPS number set in the VPS_NUMBER parameter (see above).
Note that whatever is set in this parameter, dtc_write_xenhvm_conf will add as many cdrom devices as it finds .iso files in the
/var/lib/dtc-xen/ttyssh_home/xenXX folder.
EXAMPLE
The following command:
dtc_write_xenhvm_conf 14 512 '1.2.3.4 1.2.3.5' mYvNcPaSs boot.iso
will produce this config file in /etc/xen/xen14:
kernel = "/usr/lib/xen/boot/hvmloader"
builder = 'hvm'
memory = 512
name = "xen14${VPSNAME}"
vcpus=1
pae=0
acpi=0
apic=0
vif = [ 'type=ioemu, mac=00:00:00:00:00:00, ip=1.2.3.4 1.2.3.5' ]
disk=[ 'phy:/dev/mapper/lvm1-xen14,ioemu:hda,w', 'file:/var/lib/dtc-xen/ttyssh_home/xen14/boot.iso,hdb:cdrom,r', 'file:/var/lib/dtc-
xen/ttyssh_home/xen14/cd2.iso,hdc:cdrom,r' ]
cdrom="/var/lib/dtc-xen/ttyssh_home/xen14/boot.iso"
boot="d"
vfb = [ "type=vnc,vncdisplay=21,vncpasswd=mYvNcPaSs" ]
nographic=0
vnc=1
stdvga=1
serial='pty'
Note that the above mac address will be calculated and depend on your node name: it will NOT be like the above example.
UPDATES
See http://www.gplhost.com/software-dtc-xen.html for updates.
dtc_write_xenhvm_conf(8)