File: nscp.html

package info (click to toggle)
aolserver4 4.5.1-15.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 11,772 kB
  • sloc: ansic: 45,120; tcl: 5,532; sh: 1,021; makefile: 380; pascal: 219; php: 13
file content (191 lines) | stat: -rw-r--r-- 4,545 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<html>
<head>
<title>AOLserver</title>
</head>
<body>

<h1>AOLserver Control Port Guide</h1>

<p>
<small>
$Header: /cvsroot/aolserver/aolserver.com/docs/admin/nscp.html,v 1.1 2002/03/07 19:15:34 kriston Exp $
</small>
<p>


<h2>Introduction</h2>

AOLserver includes a control port interface that can be enabled with
the nscp module. This control port interface allows you to telnet to a
specified host and port where you can administer the server and
execute database commands while the server is running.

<p>

The control port interface is a Tcl interface. Within it, you can
execute any Tcl command that Tcl libraries and ADP can; the only
exceptions being the ns_conn commands.

<p>

To administer a server with the control port interface while it is
running, the nscp module must be loaded into the server. To set
permissions for the server, the nsperm module must also be loaded. To
execute database commands while the server is running, you must also
configure database services for the server, including database drivers
and pools.

<p>

<h2>Configuring the Control Port Interface</h2>

<p>

An example configuration for the control port interface is shown
below. Three sections of the configuration file are included. The nscp
module is loaded into the /modules section for servername. The
/module/nscp section defines the control port parameters, and the
/module/nscp/users section defines the users who can log into the
control port.

<pre>
#
# Control port -- nscp
#
ns_section "ns/server/${servername}/module/nscp"
ns_param   port            9999        ;# Control port listens on port 9999
ns_param   address         "127.0.0.1" ;# For security, use 127.0.0.1 only

# Control port users
ns_section "ns/server/${servername}/module/nscp/users"
# The default password for nsadmin is "x". You should change it.
# type "ns_crypt newpassword salt" and put the encrypted string below.
ns_param user "nsadmin:t2GqvvaiIUbF2:" ;# sample user="nsadmin", pw="x".

ns_section "ns/server/${servername}/modules"
# ...
ns_param   nscp               nscp.so
</pre>

<p>

Some things to notice about the configuration are:

<p>

<br>
* The port parameter defines the port that the interface will listen
 on. The default is 9999.

<br>
* The address parameter defines the hostname to bind to. The default
 is 127.0.0.1 so that you can only connect to the control port if
 you are already logged on to the computer where the server is
 running.

<br>

* The user parameter defines users who can log into the control
 port. There are three semicolon-separated fields. The first is
 username (nsadmin); the second is a Unix-like password hash.  You
 can create a password by typing "ns_crypt mypasswd salt".  As with
 Unix, only the first four characters are used.

<p>

See the Configuration Reference for complete information on
configuration.

<p>

<h2>Using the Control Port Interface</h2>

<p>

To use the control port interface, follow these steps:

<p>
 1. Telnet to the address and port number defined in the /module/nscp
 section for the server. For example:

<p>
telnet localhost 9999
 
<p>
The session responds with:

<pre>
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
login: 
</pre>
<p>

2. At the login prompt, type a valid username. The username must be
one of the usernames defined in the /module/nscp/users section of
the configuration file. For example:

<pre>
login: nsadmin
</pre>

The session responds with:

<pre>
password:
</pre>

<p>

 3. At the password prompt, type the password associated with the
 username you specified.  The default is "x".

<p>

  The session responds with:

<pre>
Welcome to servername running at /usr/local/aolserver/bin/nsd (pid 22413)
AOLserver/3.4.2 (nsd_v3_r4_p2) for solaris built on Sep 18 2001 at 16:59:11
CVS Tag: $Name:  $

servername:nscp 1> 
</pre>

<p>

 4. At the prompt you can type nearly any Tcl command
 available to AOLserver Tcl libraries and ADPs.

<p>

 5. When you're done, just type "exit" and you will be logged off.

<p>

<h2>Useful Commands</h2>
 
Type "lsort [info commands]" for a complete list of commands available
to you.  You can type nearly any Tcl command available to AOlserver
Tcl libraries and ADPs.  This includes the complete Tcl core and
nearly any ns_* command.  Type "lsort [info commands ns*]" for a
sorted list of AOLserver Tcl commands.

<p>

Useful commands:

<p>
* ns_shutdown  -- Shuts down the server.
<br>
* ns_info uptime  -- How long the server has been running.
<br>
* exit -- Exit the control port.

<p>

  
</body>
</html>