ASCII

Decimal Hex ASCII EBCDIC Binary
0 0 NUL NUL 0000 0000
1 1 SOH SOH 0000 0001
2 2 STX STX 0000 0010
3 3 ETX ETX 0000 0011
4 4 EOT SEL 0000 0100
5 5 ENQ HT 0000 0101
6 6 ACK RNL 0000 0110
7 7 BEL DEL 0000 0111
8 8 BS GE 0000 1000
9 9 TAB SPS 0000 1001
10 A LF RPT 0000 1010
11 B VT VT 0000 1011
12 C FF FF 0000 1100
13 D CR CR 0000 1101
14 E SO SO 0000 1110
15 F SI SI 0000 1111
16 10 DLE DLE 0001 0000
17 11 DC1 DC1 0001 0001
18 12 DC2 DC2 0001 0010
19 13 DC3 DC3 0001 0011
20 14 DC4 RES/ENP 0001 0100
21 15 NAK NL 0001 0101
22 16 SYN BS 0001 0110
23 17 ETB POC 0001 0111
24 18 CAN CAN 0001 1000
25 19 EM EM 0001 1001
26 1A SUB UBS 0001 1010
27 1B ESC CU1 0001 1011
28 1C FS IFS 0001 1100
29 1D GS IGS 0001 1101
30 1E RS IRS 0001 1110
31 1F US ITB/IUS 0001 1111
32 20 DS 0010 0000
33 21 ! SOS 0010 0001
34 22 " FS 0010 0010
35 23 # WUS 0010 0011
36 24 $ BYP/INP 0010 0100
37 25 % LF 0010 0101
38 26 & ETB 0010 0110
39 27 ESC 0010 0111
40 28 ( SA 0010 1000
41 29 ) SFE 0010 1001
42 2A * SM/SW 0010 1010
43 2B + CSP 0010 1011
44 2C , MFA 0010 1100
45 2D - ENQ 0010 1101
46 2E . ACK 0010 1110
47 2F / BEL 0010 1111
48 30 0   0011 0000
49 31 1   0011 0001
50 32 2 SYN 0011 0010
51 33 3 IR 0011 0011
52 34 4 PP 0011 0100
53 35 5 TRN 0011 0101
54 36 6 NBS 0011 0110
55 37 7 EOT 0011 0111
56 38 8 SBS 0011 1000
57 39 9 IT 0011 1001
58 3A : RFF 0011 1010
59 3B ; CU3 0011 1011
60 3C < DC4 0011 1100
61 3D = NAK 0011 1101
62 3E >   0011 1110
63 3F ? SUB 0011 1111
64 40 @ SP 0100 0000
65 41 A RSP 0100 0001
66 42 B   0100 0010
67 43 C   0100 0011
68 44 D   0100 0100
69 45 E   0100 0101
70 46 F   0100 0110
71 47 G   0100 0111
72 48 H   0100 1000
73 49 I   0100 1001
74 4A J   0100 1010
75 4B K . 0100 1011
76 4C L < 0100 1100
77 4D M ( 0100 1101
78 4E N + 0100 1110
79 4F O | 0100 1111
80 50 P & 0101 0000
81 51 Q   0101 0001
82 52 R   0101 0010
83 53 S   0101 0011
84 54 T   0101 0100
85 55 U   0101 0101
86 56 V   0101 0110
87 57 W   0101 0111
88 58 X   0101 1000
89 59 Y   0101 1001
90 5A Z ! 0101 1010
91 5B [ $ 0101 1011
92 5C \ * 0101 1100
93 5D ] ) 0101 1101
94 5E ^ ; 0101 1110
95 5F _   0101 1111
96 60 ` _ 0110 0000
97 61 a / 0110 0001
98 62 b   0110 0010
99 63 c   0110 0011
100 64 d   0110 0100
101 65 e   0110 0101
102 66 f   0110 0110
103 67 g   0110 0111
104 68 h   0110 1000
105 69 i   0110 1001
106 6A j | 0110 1010
107 6B k , 0110 1011
108 6C l % 0110 1100
109 6D m _ 0110 1101
110 6E n > 0110 1110
111 6F o ? 0110 1111
112 70 p   0111 0000
113 71 q   0111 0001
114 72 r   0111 0010
115 73 s   0111 0011
116 74 t   0111 0100
117 75 u   0111 0101
118 76 v   0111 0110
119 77 w   0111 0111
120 78 x   0111 1000
121 79 y ` 0111 1001
122 7A z : 0111 1010
123 7B { # 0111 1011
124 7C | @ 0111 1100
125 7D } 0111 1101
126 7E ~ = 0111 1110
127 7F DEL " 0111 1111
128 80     1000 0000
129 81   a 1000 0001
130 82   b 1000 0010
131 83   c 1000 0011
132 84   d 1000 0100
133 85   e 1000 0101
134 86   f 1000 0110
135 87   g 1000 0111
136 88   h 1000 1000
137 89   i 1000 1001
138 8A     1000 1010
139 8B   { 1000 1011
140 8C     1000 1100
141 8D     1000 1101
142 8E     1000 1110
143 8F   + 1000 1111
144 90     1001 0000
145 91   j 1001 0001
146 92   k 1001 0010
147 93   l 1001 0011
148 94   m 1001 0100
149 95   n 1001 0101
150 96   o 1001 0110
151 97   p 1001 0111
152 98   q 1001 1000
153 99   r 1001 1001
154 9A     1001 1010
155 9B   } 1001 1011
156 9C     1001 1100
157 9D     1001 1101
158 9E     1001 1110
159 9F     1001 1111
160 A0     1010 0000
161 A1     1010 0001
162 A2   s 1010 0010
163 A3   t 1010 0011
164 A4   u 1010 0100
165 A5   v 1010 0101
166 A6   w 1010 0110
167 A7   x 1010 0111
168 A8   y 1010 1000
169 A9   z 1010 1001
170 AA     1010 1010
171 AB     1010 1011
172 AC     1010 1100
173 AD   [ 1010 1101
174 AE     1010 1110
175 AF     1010 1111
176 B0     1011 0000
177 B1     1011 0001
178 B2     1011 0010
179 B3     1011 0011
180 B4     1011 0100
181 B5     1011 0101
182 B6     1011 0110
183 B7     1011 0111
184 B8     1011 1000
185 B9     1011 1001
186 BA     1011 1010
187 BB     1011 1011
188 BC     1011 1100
189 BD     1011 1101
190 BE     1011 1110
191 BF     1011 1111
192 C0     1100 0000
193 C1   A 1100 0001
194 C2   B 1100 0010
195 C3   C 1100 0011
196 C4   D 1100 0100
197 C5   E 1100 0101
198 C6   F 1100 0110
199 C7   G 1100 0111
200 C8   H 1100 1000
201 C9   I 1100 1001
202 CA     1100 1010
203 CB     1100 1011
204 CC     1100 1100
205 CD     1100 1101
206 CE     1100 1110
207 CF     1100 1111
208 D0     1101 0000
209 D1   J 1101 0001
210 D2   K 1101 0010
211 D3   L 1101 0011
212 D4   M 1101 0100
213 D5   N 1101 0101
214 D6   O 1101 0110
215 D7   P 1101 0111
216 D8   Q 1101 1000
217 D9   R 1101 1001
218 DA     1101 1010
219 DB     1101 1011
220 DC     1101 1100
221 DD     1101 1101
222 DE     1101 1110
223 DF     1101 1111
224 E0     1110 0000
225 E1     1110 0001
226 E2   S 1110 0010
227 E3   T 1110 0011
228 E4   U 1110 0100
229 E5   V 1110 0101
230 E6   W 1110 0110
231 E7   X 1110 0111
232 E8   Y 1110 1000
233 E9   Z 1110 1001
234 EA     1110 1010
235 EB     1110 1011
236 EC     1110 1100
237 ED     1110 1101
238 EE     1110 1110
239 EF     1110 1111
240 F0   0 1111 0000
241 F1   1 1111 0001
242 F2   2 1111 0010
243 F3   3 1111 0011
244 F4   4 1111 0100
245 F5   5 1111 0101
246 F6   6 1111 0110
247 F7   7 1111 0111
248 F8   8 1111 1000
249 F9   9 1111 1001
250 FA     1111 1010
251 FB     1111 1011
252 FC     1111 1100
253 FD     1111 1101
254 FE     1111 1110
255 FF     1111 1111

Comments off

ZFS Cheats

Solaris Containers cheat sheet
This a quick cheat sheet of the commands that can be used when using zones (containers), for a more complete guide see solaris zones.
Zone States

Configured
Configuration has been completed and storage has been committed.
Additional configuration is still required.
Incomplete
Zone is in this state when it is being installed or uninstalled.
Installed
The zone has a confirmed configuration,
zoneadm
is used to verify the
configuration, Solaris packages have been installed, even through it has
been installed, it still has no virtual platform associated with it.
Ready (active)
Zone’s virtual platform is established. The kernel creates the
zsched

process, the network interfaces are plumbed and filesystems mounted. The
system also assigns a zone ID at this state, but no processes are
associated with this zone.
Running (active)
A zone enters this state when the first user process is created. This is
the normal state for an operational zone.
Shutting down + Down (active)
Normal state when a zone is being shutdown.
Cheat sheet

Creating a zone
zonecfg -z
see creating a zone for a more details
deleting a zone from the global ssytem
zonecfg -z delete -F
Display zones current configuration
zonecfg -z info
Create a zone creation file
zonecfg -z export

Verify a zone
zoneadm -z verify
Installing a zone
zoneadm -z install
Ready a zone
zoneadm -z ready
boot a zone
zoneadm -z boot
reboot a zone
zoneadm -z reboot
halt a zone
zoneadm -z halt
uninstalling a zone
zoneadm -z uninstall -F
Veiwing zones
zoneadm list -cv

login into a zone
zlogin
login to a zones console
zlogin -C (use ~. to exit)
login into a zone in safe mode (recovery)
zlogin -S

add/remove a package (global zone)
# pkgadd -G -d .

If the -G option is missing the package will be
added to all zones
add/remove a package (non-global zone)
# pkgadd -Z -d . If the -Z option is missing the package will be
added to all zones
Query packages in all non-global zones
# pkginfo -Z
query packages in a specified zone
# pkginfo -z

lists processes in a zone
# ps -z
list the ipcs in a zone
# ipcs -z
process grep in a zone
# pgrep -z
list the ptree in a zone
# ptree -z
Display all filesystems
# df -Zk
display the zones process informtion (must be login into the zone)
# psrstat -Z

Quick and dirty ZFS cheatsheet
December 20, 2008
Create simple striped pool:
zpool create [pool_name] [device] [device] …
zpool create datapool c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0
Create mirrored pool:
zpool create [pool_name] mirror [device] [device] …
zpool create datapool mirror c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0
Create Raid-Z pool:
zpool create [pool_name] raidz [device] [device] [device] …
zpool create datapool raidz c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0 c5t439257C4000019250000900000540000d0
Transform simple pool to a mirror:
zpool create [pool_name] [device] zpool attach [pool_name] [existing_device] [new_device]
zpool create datapool c5t433127A900011C370000C00003210000d0 zpool attach datapool c5t433127A900011C370000C00003210000d0 c5t433127B4001031250000900000540000d0
Expand simple pool:
zpool create [pool_name] [device] zpool add [pool_name] [new_device]
zpool create datapool c5t433127A900011C370000C00003210000d0 zpool add datapool c5t433127B4001031250000900000540000d0
Expand mirrored pool by attaching additional mirror:
zpool add [pool_name] mirror [new_device] [new_device]
zpool add datapool mirror c5t433127A900011C370000C00003460000d0 c5t433127B400011C370000C00003410000d0
Replace device in a pool:
zpool replace [pool_name] [old_device] [new_device]
zpool replace datapool c5t433127A900011C370000C00003410000d0 c5t433127B4001031250000900000540000d0
Destroy pool:
zpool destroy [pool_name]
zpool destroy datapool

Set pool mountpoint:
zfs set mountpoint=/path [pool_name]
zfs set mountpoint=/export/zfs datapool
Display configured pools:
zpool list
zpool list
Display pool status info:
zpool status [-v] [pool_name]
zpool status -v datapool
Display pool I/O statistics:
zpool iostat [pool_name]
zpool iostat datapool
Display pool command history:
zpool history [pool_name]
zpool history datapool
Export a pool:
zpool export [pool_name]
zpool export datapool
Import a pool:
zpool import [pool_name]
zpool import datapool
Create a filesystem:
zfs create [pool_name]/[fs_name]
zfs create datapool/filesystem
Destroy a filesystem:
zfs destroy [pool_name]/[fs_name]
zfs destroy datapool/filesystem
Rename a filesystem:
zfs rename [pool_name]/[fs_name] [pool_name]/[fs_name]
zfs rename datapool/filesystem datapool/newfilesystem
Move a filesystem:
zfs rename [pool_name]/[fs_name] [pool_name]/[fs_name]/[fs_name]
zfs rename datapool/filesystem datapool/users/filesystem
Display properties of a filesystem:
zfs get all [pool_name]/[fs_name]
zfs get all datapool/filesystem
Make a snapshot:
zfs snapshot [pool_name]/[fs_name]@[time]
zfs snapshot datapool/filesystem@friday
Roll back filesystem to its snapshot:
zfs rollback [pool_name]/[fs_name]@[time]
zfs rollback datapool/filesystem@friday
Clone a filesystem:
zfs snapshot [pool_name]/[fs_name]@[time] zfs clone [pool_name]/[fs_name]@[time] [pool_name]/[fs_name]
zfs snapshot datapool/filesystem@today zfs clone datapool/filesystem@today datapool/filesystemclone
Backup filesystem to a file:
zfs send [pool_name]/[fs_name] > /path/to/file
zfs send datapool/filesystem@friday > /tmp/filesystem.bkp
Restore filesystem from a file:
zfs receive [pool_name]/[fs_name] < /path/to/file
zfs receive datapool/restoredfilesystem < /tmp/filesystem.bkp
Create ZFS volume:
zfs create -V [size] [pool_name]/[vol_name]
zfs create -V 100mb datapool/zvolume newfs /dev/zvol/dsk/datapool/zvolume

System Controller Systems (4800, 6900)
These systems have a system controller accessable over the network. They are given a name distinct from the system(s) they control because they can control multiple different systems. To gain access to the system controller, telnet to the relevant name and choose the ‘Platform Shell’ option. You will then need to provide a password. The other options in this list are for access to the relevant system consoles. At the command line, the following should be enough for basic operation :-

Command

Action

poweron all

Turn on all boards and start systems booting

setkeyswitch -d A
Turn off domain A (or C if you replace A in the command)
eXtended System Control Facility (XSCF on the M5000)

The XSCF is provided on separate hardware from the main M5000 processing capacity. The network interfaces are distinct from those used by the server and are configured to connect via ssh. To gain access to the console ssh in to the XSCF controller and subsequently connect to domain 0 on the system. The M5000 servers are all configured with one domain at present. The controllers are registered in the format ‘jamaican-xscf.iso.port.ac.uk’.
Command

Action

poweron -d 0

Power on domain 0

poweroff -d 0

Power off domain 0

sendbreak -d 0

Send a break signal to domain 0

console -d 0

Connect to the console of domain 0
showdomainstatus -a
show status of all domains

integrated Lights Out Manager (iLom on the T5220)
The iLom can be used both via ssh or a web browser interface. To connect to the to the iLom of a server use the name format ‘bread-lom.iso.port.ac.uk’. Although the servers are capable of making use of an aLom interface, Sun are reportedly standerdizing all controllers to the iLom model and as such it would be best to familiarize with the new commands.
Command

Action

start /SP/console

Connect to the console of the server
set /HOST send_break_action=break
send a break signal to the host

Comments off

Best ways to redirect web pages….

301 Redirect

301 redirect is the most efficient and Search Engine Friendly method for webpage redirection.
The code “301″ is interpreted as “moved permanently”.

Below are a Couple of methods to implement URL Redirection

IIS Redirect

* In internet services manager, right click on the file or folder you wish to redirect
* Select the radio titled “a redirection to a URL”.
* Enter the redirection page
* Check “The exact url entered above” and the “A permanent redirection for this resource”
* Click on ‘Apply’

ColdFusion Redirect
<.cfheader statuscode="301" statustext="Moved permanently">
<.cfheader name="Location" value="http://www.new-url.com">

PHP Redirect
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.new-url.com" );
?>

ASP Redirect
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.new-url.com/"
%>

ASP .NET Redirect

JSP (Java) Redirect
<%
response.setStatus(301);
response.setHeader( "Location", "http://www.new-url.com/" );
response.setHeader( "Connection", "close" );
%>

CGI PERL Redirect
$q = new CGI;
print $q->redirect(”http://www.new-url.com/”);

Ruby on Rails Redirect
def old_action
headers["Status"] = “301 Moved Permanently”
redirect_to “http://www.new-url.com/”
end

Redirect Old domain to New domain (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Please REPLACE www.newdomain.com in the above code with your actual domain name.

In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

Redirect to www (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

Please REPLACE domain.com and www.newdomain.com with your actual domain name.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

How to Redirect HTML

Please refer to section titled ‘How to Redirect with htaccess’, if your site is hosted on a Linux Server and ‘IIS Redirect’, if your site is hosted on a Windows Server.

Comments off

VOIP: Ports pointers

If you plan on using phones or accessing the PBX from remote locations, it’s necessary to forward certain ports back to your PBX. www.portforward.com is a good resource for documentation on how to forward ports on most routers.

The following ports are used by the PBX.

TCP/UDP Port(s) description Used by Remote Phones
UDP 5060 SIP signaling port needed for phones outside your network
UDP 10000-10500 RTP audio ports needed for phones outside your network
Used for accessing the PBX web interface remotely
TCP 80 HTTP port for remote web voicemail access
TCP 443 HTTPS port for remote web admin access
TCP 5222 & 843 SMB Systems Only – ports for using the Switchboard remotely

Comments off

US Units of Measure and Conversion Tables

Temperature

In the US temperature is measured according to the Fahrenheit scale.
To convert Celsius (Centigrade) to Fahrenheit, multiply by 1.8 (or
9/5) and add 32. Conversely, to convert Fahrenheit to Celsius, subtract
32 and divided by 1.8.

Temperature
Celsius (C)
(C) = (5/9) * ((F) – 32)
Fahrenheit (F)

(F) = ((9/5) * (C)) + 32

-17.8°
-10° 14°
32°
10° 50°
20° 68°
30° 86°
40° 104°
100° 212°

Normal Body Temperature: 98.6° F or 37° C

Weight

In the US weight is expressed in terms of “ounces” (oz.) and “pounds” (lbs.).

Weights
US System Metric System
1 oz. 30 g.
16 oz. or 1 lb. 450 g.
2.2 lbs 1000 g.=1 kilogram (kg.)
2000 lbs = 1 ton 900 kg

Length and Distance

In the US the metric system is only very slowly being adopted as the
standard of linear measure.

In the mean time, check the table below for the more widely used standards:

US Length/Distance Measurement
Term Abbreviation Symbol Equivalents
inch in. 1″
foot ft. 12″ = 1′
yard yd. (none) 36″ = 3′ = 1 yd.
mile mi. (none) 5280′ = 1 mi.
Length/Distance Conversion
US System Metric System
1 in. 2.54 cm
1 yd. 91.44 cm
1 mi. 1.609 km

Cooking Measures

Measurements for recipes in the US are in terms of volume rather than
weight for dry as well as liquid ingredients. The standards of measure
such as “teaspoon” or “cup” refer to cooking utensils you can buy at
any supermarket. The terms do not refer to the common household teaspoon
or cup.

Abbreviations Used in Cookbooks
Abbreviation Unit of Measurement
tsp. (or t) teaspoon
tbs. (or T) tablespoon
C. (or c.) cup
oz. ounce
pt. pint
qt. quart
lb. pound
Liquid Measurement
Spoons and Cups Liquid Ounces
1 tsp. 1/6 oz.
1 tbs. 1/2 oz.
6 2/3 tbs. 3 1/2 oz.
1 C. (16 tbs.) 8 oz.
2 C. (1pt.) 16 oz. (1 lb.)
4 C. (1 qt.) 32 oz. (2 lbs.)
4 1/3 C. 2.2 lbs.
Volume Conversion for Ingredients
US System Metric System
Liquid 1 liquid qt. 0.95 liter
1.06 liquid qts. 1 liter
Dry 0.91 dry qts. 1 liter
1 dry qt. 1.1 liter
Oven Temperature
  Farenheit Celsius
Cool 200 93
Low or very low 225 107
Slow 300 149
Moderate 350 177
375 191
Hot 400 or above 205 or above

Comments off

qmail : purge outbound messages

Trick qmail into thinking the messages have been around too long, it will give up and discard the messages. This can be done using find in conjunction with touch:

find /var/qmail/queue/ -type f -depth 3 -exec touch -t 200001010101 {} ;

Once we’ve touched the messages we then need to signal qmail to re-run the queue :

killall -ALRM qmail-send

check mail logs..

/var/log/qmail …

Comments off

Order of operation… Math operators in Excel

The math operators in Excel have an order of operation, just like in regular math. The order of operation is the order in which they’re processed when multiple operators appear in the same formula. Here are the rules that determine the order:

1. Any operations that are in parentheses, from left to right
2. Exponentiation (^)
3. Multiplication (*) and division (/)
4. Addition (+) and subtraction (-)

Parentheses override everything and go first. So, if you need to execute an operation out of the normal order, you place it in parentheses.

For example, suppose you have this formula:

=5+16/4^2

The order of operation looks like this:

1. The exponentiation (4^2 equals 16)
2. The division (16/16 equals 1)
3. The addition (5+1 equals 6)

The result of the formula is 6.

If you wanted the addition to occur first, you could put parentheses around the addition portion of the equation, like this:

=(5+16)/4^2

This time, the order of operation looks like this:

1. The part in parentheses (5+16 equals 21)
2. The exponentiation (4^2 equals 16)
3. The division (21/16 equals 1.3125)

The result of this formula is 1.3125.

If you wanted to perform the exponentiation last, you could add another set of parentheses, like this:

=((5+16)/4)^2

Now the order is this:

1. The inner parentheses (5+16 equals 21)
2. The outer parentheses (21/4 equals 5.25)
3. The exponentiation (5.25^2 equals 27.5625)

The result of this formula is 27.5625.

If you left off the inner set of parentheses and wrote it like this:

=(5+16/4)^2

The order would be as follows:

1. The division, because it’s the highest-ranking operation inside the parentheses (16/4 equals 4)
2. The rest of the parenthetical operations (5+4 equals 9)
3. The exponent (9^2 equals 81)

The result of this formula is 81.

Comments off

The Types of Commands used for Managing IIS from the Command Line

The types of commands which you can use to manage IIS from the command line are:
Click here to find out more!

* IISReset, Windows Management Instrumentation (WMI) scripts, Active Directory Services Interface (ADSI), and the standard Windows commands and Support Tools utilities.

IISReset Command-line Utility

IISReset is a command-line utility that has been in existence from IIS 5, which you can use to stop IIS, restart IIS, and reboot the IIS server. Typical reasons for restarting IIS are:

* When problematic ASP.NET and ASP application exist, and you need to eliminate resource leaks, or initiate resource recycling.
* When certain IIS configuration changes are made, you would need to restart IIS so that the changes are applied. A few of these types of configuration settings changes are listed below:
o IIS needs to be restarted when the IIS isolation mode is changed.
o When you restore the metabase from a metabase history file manually, you need to restart IIS.
o You have to restart IIS when you change the Direct Metabase Edit feature’s property, EnableEditWhileRunning, directly in the metabase file.
o IIS also has to be restarted whenever changes are made to any global configuration settings located under HKLM\Software\Microsoft\InetMgr\Parameters.

Windows Management Instrumentation (WMI)

You can use WMI scripts for a few typical IIS management tasks:

* Create and delete Web sites and FTP sites
* Create and delete virtual directories
* Enable/disable web service extensions
* Backup and restore IIS configuration, and copy IIS configuration
* Import/export portions of the metabase, as well as other management tasks

A few WMI scripts are provided by Microsoft, and are located in the \Windows\System32 directory. These WMI scripts and their associated functions are listed below:

* iisweb.vbs: Used to perform the following management tasks from the command line:
o List Web sites
o Create/delete Web sites
o Start/stop Web sites
* iisvdir.vbs: Used for performing the following management tasks from the command line:
o Create/delete virtual directories for Web sites
o List virtual directories in a specified root.
* iisapp.vbs: For listing all Web applications which are running on the IIS machine.
* iisback.vbs: For backing up and restoring IIS configuration settings, and for deleting IIS backups.
* iiscnfg.vbs: Used to perform the following management tasks from the command line:
o Import and export IIS configurations as XML files
o Save IIS configuration to disk.
o Copy IIS configuration settings
* iisext.vbs: Used for performing the following management tasks from the command line:
o List applications
o Enable applications
o Add/remove application dependencies
o Enable/disable web service extensions
o List and add/remove web service extension files
o Enable/disable web service extension files
* iisftp.vbs: Used to perform the following management tasks from the command line:
o List FTP sites
o Create/delete FTP sites
o Start/stop FTP sites
o Set Active Directory user isolation for your FTP sites
* iisftpdr.vbs: Used to perform the following management tasks from the command line:
o Create and delete virtual directories in FTP sites
o List virtual directories in a specified root.

Active Directory Services Interface (ADSI)

Active Directory Services Interface (ADSI) was used in IIS 5 to manage IIS from the command line. Through ADSI, you can change IIS configuration settings, and configure websites, applications, and virtual directories from the command line. With IIS 6, it is recommended to use WMI scripts over ADSI. Any custom ADSI scripts previously used in IIS 5 should be tested to verify that they work in IIS 6.
Windows Commands and Support Tools Utilities

A few IIS specific Windows commands, such as the net commands, can be used to manage IIS from the command line:

* net start and net stop: Used to start and stop IIS services. The service name which you should use when utilizing the net command to start, or stop IIS services are listed below:
o FTP service = msftpsvc
o IIS Admin service = iisadmin
o NNTP service = nntpsvc
o SMTP service = smtpsvc
o WWW service = w3svc
* net localgroup: Used to add a user account to the IIS_WPG group. Accounts utilized as application pool identities are members of the IIS_WPG group.
* Cacls: Used to capture NTFS permissions on the IIS server.
* Convlog: Used to convert the IIS log files to the NCSA format.

You can also use the resource kit utilities listed below to manage certain elements of IIS:

* secedit: Used to administer security templates.
* auditpol: Used to change audit policies from the command line
* showmbrs: Used to list the members of security groups which have permissions on directories and files.

How to schedule IISReset.exe through Task Scheduler

IISReset is typically used when you need to recover from faulty application situations. You can use Windows Task Scheduler to schedule IIS to restart according to predefined parameters.

1. Open Control Panel.
2. Select Scheduled Tasks, and then select Add Scheduled Task.
3. Click Next for the Scheduled Task Wizard to start.
4. Click Browse and browse to Windows\System32 folder.
5. Double-click IISReset.exe.
6. Enter a task name, and select when the task should run. Click Next.
7. Enter the Administrator account details that should be utilized to run IISReset. Click Next.
8. If you want to configure advanced task scheduling properties, click the Advanced checkbox; or alternatively click Finish.
9. Open the Properties dialog box of the task you just configured, and click the Task tab.
10. Add any additional switches in the Run box.
11. Click OK.

How to use iisweb.vbs to manage Web sites

The iisweb.vbs utility is used to list Web sites, create and delete Web sites, and start and stop Web sites in IIS.

iisweb.vbs has the following main switches:

* /create, for creating a Web site.
* /delete, for deleting a Web site.
* /start, for starting a Web site.
* /stop, for stopping a Web site
* /pause, for pausing a Web site
* /query, for troubleshooting a Web site – displaying all the Web sites on the IIS machine

To create a Web site, use:

iisweb[.vbs] /create Path SiteName [/b Port] [/i IPAddress] [/d HostHeader] [/dontstart] [/s Computer [/u [Domain\]User [/p Password]]]

* Path, the physical location to the files for the Web site. When the directory does not exist, the script creates it.
* SiteName, the name of the new Web site. This is the name which will be displayed in IIS Manager.
* /b Port, the port on which the new Web site should listen for HTTP requests. The default value is port 80.
* /i IPAddress, the IP address that must be assigned to the Web site.
* /d HostHeader, the host header for the new site.
* /dontstart, used to indicate that IIS should not automatically start the Web site after it is created. IIS by default starts a newly created Web site.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to create the Web site on the remote computer.
* /p Password, the password of the account credentials (above).

To start, stop, delete, or pause a Web site, use:

iisweb[.vbs] {/delete | /start | /stop | /pause} WebSite [WebSite...] [/s Computer [/u [Domain\]User [/p Password]]]

* WebSite, the name of the Web site which should be deleted, started, stopped, or paused.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to delete, start, stop, or pause the Web site on the remote computer.
* /p Password, the password of the account credentials (above).

To query Web sites on your IIS servers, use

iisweb[.vbs] /query [WebSite [WebSite...]] [/s Computer [/u [Domain\]User [/p Password]]]
How to use iisvdir.vbs to manage virtual directories

The iisvdir.vbs command can be used to list virtual directories in a specified root, to create and delete virtual directories for websites, and to query virtual directories of an IIS server.

To create a virtual directory for a Web site, use:

iisvdir /create WebSite[/VirtualPath] Name PhysicalPath [/s Computer [/u [Domain\]User /p Password]]

* WebSite, the name of the Web site which you want to create the virtual directory for.
* VirtualPath, the virtual path under which this virtual directory should be created (optional)
* Name, the name of the new virtual directory.
* PhysicalPath, the name of physical directory where the virtual directory points.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to create the virtual directory for the remote computer.
* /p Password, the password of the account credentials (above).

To delete a virtual directory associated with a Web site, use:

iisvdir /delete WebSite[/VirtualPath] Name [/s Computer [/u [Domain\]User/p Password]]

* WebSite, the name of the Web site which is associated with the virtual directory that you want to delete.
* VirtualPath, the virtual path which holds the virtual directory (optional).
* Name, the name of the virtual directory that you want to delete.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to delete the virtual directory.
* /p Password, the password of the account credentials (above).

To query Web site specific virtual directories on your IIS servers, use

iisvdir /query WebSite[/VirtualPath][/s Computer [/u [Domain\] User/p Password]]

* WebSite, the name of the Web site which is associated with the virtual directory that you want to query.
* VirtualPath, the virtual path which holds the virtual directory (optional).
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to query for virtual directories.
* /p Password, the password of the account credentials (above).

How to use iisftp.vbs to manage FTP sites

The iisftp.vbs utility is used to perform management tasks from the command line that are specific to managing FTP sites on the IIS servers.

iisftp.vbs has the following main switches:

* /create, for creating a FTP site.
* /delete, for deleting a FTP site.
* /start, for starting a FTP site.
* /stop, for stopping a FTP site
* /query, for troubleshooting a FTP site – displaying all the FTP sites on the IIS machine
* /setadprop, for indicating that Active Directory properties should be used for a particular user accessing the FTP site.
* /getadprop, for obtaining Active Directory properties for the particular user.

To create a FTP site, use:

iisftp /create Path SiteName [/b Port] [/i IPAddress] [/dontstart] [/isolation {AD|Local} [/domain DomainName /Admin [Domain\]User /AdminPwd Password]] [/s Computer [/u [Domain\]User/p Password]]

* Path, the physical location to the files for the FTP site.
* SiteName, the name of the new FTP site. This is the name which will be displayed in IIS Manager.
* /b Port, the port on which the new FTP site should listen for FTP requests. The default value is port 21.
* /i IPAddress, the IP address that must be assigned to the FTP site.
* /dontstart, used to indicate that IIS should not automatically start the FTP site after it is created. IIS by default starts all newly created sites.
* /isolation, used to indicate the isolation mode that should be used.
* domain, when Active Directory is selected as the isolation mode, this is the domain for Active Directory.
* admin, when Active Directory is selected as the isolation mode, this is the admin account credentials for Active Directory.
* AdminPwd, when Active Directory is selected as the isolation mode, this is the password of the admin account for Active Directory (above).
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to create the FTP site on the remote computer.
* /p Password, the password of the account credentials (above).

To start, stop, delete, or pause a FTP site, use:

iisftp[.vbs] {/delete | /start | /stop | /pause} FTPSite [FTPSite...] [/s Computer [/u [Domain\]User [/p Password]]]

* FTPSite, the name of the FTP site which should be deleted, started, stopped, or paused.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to delete, start, stop, or pause the FTP site on the remote computer.
* /p Password, the password of the account credentials (above).

To query FTP sites on your IIS servers, use

iisftp[.vbs] /query [FTPSite [FTPSite...]] [/s Computer [/u [Domain\]User [/p Password]]]

To use /setadprop, and /getadprop use,

iisftp /SetADProp UserID {FTPDir|FTPRoot} PropertyValue [/s Computer [/u [Domain\]User/p Password]]

iisftp /GetADProp UserID [/s Computer [/u [Domain\]User /p Password]]

* UserID, the Active Directory user login ID
* FTPDir, indicates whether the modification is applicable at the directory level or at the root level.
* PropertyValue, indicates the home directory and relative path.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used for remote administration.
* /p Password, the password of the account credentials (above).

How to use iisftpdr.vbsto manage virtual directories

The iisftpdr.vbs command can be used to list virtual directories in a specified root, and to create and delete virtual directories in FTP sites from the command line.

To create a virtual directory for a FTP site, use:

iisftpdr /create FTPSite[VirtualPath] Name PhysicalPath [/s Computer [/u [Domain\]User /p Password]]

* FTPSite, the name of the FTP site which you want to create the virtual directory for.
* VirtualPath, the virtual path under which this virtual directory should be created (optional)
* Name, the name of the new virtual directory.
* PhysicalPath, the name of physical directory where the virtual directory points.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to create the virtual directory on the remote computer.
* /p Password, the password of the account credentials (above).

To delete a virtual directory associated with a FTP site, use:

iisftpdr /delete FTPSite[VirtualPath]/Name [/s Computer [/u [Domain\]User /p Password]]

* FTPSite, the name of the FTP site which is associated with the virtual directory that you want to delete.
* VirtualPath, the virtual path which holds the virtual directory (optional).
* Name, the name of the virtual directory that you want to delete.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to delete the virtual directory.
* /p Password, the password of the account credentials (above).

To query FTP specific virtual directories on your IIS servers, use

iisftpdr /query FTPSite[/VirtualPath][/s Computer [/u [Domain\]User/p Password]]

* FTPSite, the name of the FTP site which is associated with the virtual directory that you want to query.
* VirtualPath, the virtual path which holds the virtual directory (optional).
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to query for virtual directories remotely.
* /p Password, the password of the user account (above).

How to use iiscnfg.vbs to manage IIS from the command line

You can use iiscnfg.vbs to import and export IIS configurations settings of the metabase as XML files.

To export IIS configuration settings, use:

iiscnfg /export /f [Path\]FileName.xml /sp SourcePath [/d EncryptingPassword] [/inherited] [/children] [/s Computer [/u [Domain\]User [/p Password]]]

* /f [Path\]FileName.xml, the name of the XML file that the configuration settings should be exported to.
* /sp SourcePath, the node of the metabase configuration settings.
* /d EncryptingPassword, the password of the XML file.
* /inherited, indicates that all inherited information should be exported.
* /children, indicates that subkeys of the node should be exported.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to run the script.
* /p Password, the password of the account credentials (above).

To import IIS configuration settings, use:

iiscnfg /import /f [Path\]FileName.xml /sp SourcePath /dp DestinationPath [/d EncryptingPassword] [/inherited] [/children] [/merge][/s Computer [/u [Domain\]User [/p Password]]]

* /f [Path\]FileName.xml, the name of the XML file that should be used to import IIS configuration settings to the server.
* /sp SourcePath, the node of the XML file.
* /dp DestinationPath, the destination node path in the metabase.
* /d EncryptingPassword, the password of the XML file.
* /inherited, indicates that all inherited information should be imported. This can only occur when the source node has properties that can be inherited.
* /children, indicates that subkeys of the node should be imported.
* /merge, merges different source keys to one metabase key through this value.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to run the script.
* /p Password, the password of the user account (above).

To copy the metabase.xml file and metabase XML file to a different IIS server, use:

iiscnfg /copy /ts TargetComputer /tu TargetUser /tp TargetPassword [/s Computer [/u [Domain\]User [/p Password]]]

* /ts TargetComputer, the name or IP address of the IIS computer to which these configuration settings should be copied.
* tu TargetUser, the user account for logging on the target computer.
* tp TargetPassword, the password of the account provided above.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to run the script remotely.
* /p Password, the password of the account (above).

To immediately save configuration changes to the metabase, use:

iiscnfg /save [/s Computer [/u [Domain\]User /p Password]]

* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to run the script.
* /p Password, the password of the account (above).

How to use iisback.vbs to back up IIS configuration settings and restore IIS configurations

You can use iisback.vbs to back up, and restore IIS configuration settings from the command line

To back up IIS configuration settings, use:

iisback /backup [/b BackupName] [/v {Integer | HIGHEST_VERSION | NEXT_VERSION}] [/overwrite] [/e EncryptingPassword] [/s Computer [/u [Domain\]User/p Password]]

* /b BackupName, the name of the back up.
* /v {Integer}, possible values are HIGHEST_VERSION or NEXT_VERSION. HIGHEST_VERSION creates a backup of the highest version number. The HIGHEST_VERSION value has to be utilized with /overwrite. NEXT_VERSION increments the existing version number by one.
* /overwrite, used to overwrite a current backup
* /e EncryptingPassword, used to enable password encryption for the backup.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to create backups for the remote computer.
* /p Password, the password of the account credentials (above).

To restore IIS configuration settings, use:

iisback /restore /b BackupName [/v {Integer | HIGHEST_VERSION}] [/e EncryptionPassword] [/s Computer [/u [Domain\]User/p Password]]

* /b BackupName, the name of the backup file that you want to restore.
* /v {Integer}, possible values are HIGHEST_VERSION or NEXT_VERSION.
* /e EncryptingPassword, the password for the backup.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to restore the backup file for the remote computer.
* /p Password, the password of the account (above).

To list all IIS backups for an IIS server, use:

iisback /list [/s Computer [/u [Domain\]User/p Password]]

* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to list all backups for the remote computer.
* /p Password, the password of the account credentials (above).

To delete an IIS backup, use:

iisback /delete [/bBackupName] [/v {Integer | HIGHEST_VERSION}] [/s Computer [/u [Domain\]User /p Password]]

* /bBackupName, the name of the backup file that you want to delete.
* /v {Integer}, possible values are HIGHEST_VERSION or NEXT_VERSION.
* /s Computer, used to indicate that the script should run on this remote computer. The local computer is used by default.
* /u [Domain\]User, the account credentials that must be used to delete the backup file for the remote computer.
* /p Password, the password of the account credentials (above).

Comments off

What happened to HyperTerminal?

What happened to HyperTerminal?

Applies to all editions of Windows Vista.
Which edition of Windows Vista am I using?

HyperTerminal is no longer part of Windows. There are several options you can use to replace its functionality.

If you only need remote shell access, you can use WinRS (Windows Remote Shell), new in Windows Vista. To get help with WinRS, type winrs /? at the command prompt, and then press ENTER.

Telnet is a simple, text-based program that you can use to connect to another computer over the Internet.

If you previously used HyperTerminal to troubleshoot modem problems, use Phone and Modem Options instead:

Open Phone and Modem Options by clicking the Start button Picture of the Start button, clicking Control Panel, clicking Hardware and Sound, and then clicking Phone and Modem Options.
NoteYou might need to provide information, such as your country or region and any special phone dialing rules, in the Location Information dialog box before you can access the Phone and Modem Options dialog box.

If you previously used HyperTerminal to control serial devices, you can usually find a downloadable version of HyperTerminal on the Internet that is free for personal use.

Comments off

How can I recover a bad superblock from a corrupted ext3 partition?

I’m getting following error:

/dev/sda2: Input/output error
mount: /dev/sda2: can’t read superblock

How do I fix this error?

A. Linux ext2/3 filesystem stores superblock at different backup location so it is possible to get back data from corrupted partition.
[Warning examples may crash your computer] WARNING! Make sure file system is UNMOUNTED.

If your system will give you a terminal type the following command, else boot Linux system from rescue disk (boot from 1st CD/DVD. At boot: prompt type command linux rescue).
Mount partition using alternate superblock

Find out superblock location for /dev/sda2:
# dumpe2fs /dev/sda2 | grep superblock
Sample output:

Primary superblock at 0, Group descriptors at 1-6
Backup superblock at 32768, Group descriptors at 32769-32774
Backup superblock at 98304, Group descriptors at 98305-98310
Backup superblock at 163840, Group descriptors at 163841-163846
Backup superblock at 229376, Group descriptors at 229377-229382
Backup superblock at 294912, Group descriptors at 294913-294918
Backup superblock at 819200, Group descriptors at 819201-819206
Backup superblock at 884736, Group descriptors at 884737-884742
Backup superblock at 1605632, Group descriptors at 1605633-1605638
Backup superblock at 2654208, Group descriptors at 2654209-2654214
Backup superblock at 4096000, Group descriptors at 4096001-4096006
Backup superblock at 7962624, Group descriptors at 7962625-7962630
Backup superblock at 11239424, Group descriptors at 11239425-11239430
Backup superblock at 20480000, Group descriptors at 20480001-20480006
Backup superblock at 23887872, Group descriptors at 23887873-23887878

Now check and repair a Linux file system using alternate superblock # 32768:
# fsck -b 32768 /dev/sda2
Sample output:

fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
/dev/sda2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #241 (32254, counted=32253).
Fix? yes

Free blocks count wrong for group #362 (32254, counted=32248).
Fix? yes

Free blocks count wrong for group #368 (32254, counted=27774).
Fix? yes
……….
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 59586/30539776 files (0.6% non-contiguous), 3604682/61059048 blocks

Now try to mount file system using mount command:
# mount /dev/sda2 /mnt
You can also use superblock stored at 32768 to mount partition, enter:
# mount sb={alternative-superblock} /dev/device /mnt
# mount sb=32768 /dev/sda2 /mnt
Try to browse and access file system:
# cd /mnt
# mkdir test
# ls -l
# cp file /path/to/safe/location

You should always keep backup of all important data including configuration files.

Comments off

« Previous entries