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 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
|
'\"
'\" The contents of this file are subject to the AOLserver Public License
'\" Version 1.1 (the "License"); you may not use this file except in
'\" compliance with the License. You may obtain a copy of the License at
'\" http://aolserver.com/.
'\"
'\" Software distributed under the License is distributed on an "AS IS"
'\" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
'\" the License for the specific language governing rights and limitations
'\" under the License.
'\"
'\" The Original Code is AOLserver Code and related documentation
'\" distributed by AOL.
'\"
'\" The Initial Developer of the Original Code is America Online,
'\" Inc. Portions created by AOL are Copyright (C) 1999 America Online,
'\" Inc. All Rights Reserved.
'\"
'\" Alternatively, the contents of this file may be used under the terms
'\" of the GNU General Public License (the "GPL"), in which case the
'\" provisions of GPL are applicable instead of those above. If you wish
'\" to allow use of your version of this file only under the terms of the
'\" GPL and not to allow others to use your version of this file under the
'\" License, indicate your decision by deleting the provisions above and
'\" replace them with the notice and other provisions required by the GPL.
'\" If you do not delete the provisions above, a recipient may use your
'\" version of this file under either the License or the GPL.
'\"
'\"
'\" $Header: /cvsroot/aolserver/aolserver/doc/Ns_Info.3,v 1.6 2006/04/19 17:37:30 jgdavidson Exp $
'\"
'\"
.so man.macros
.TH Ns_Info 3 4.0 AOLserver "AOLserver Library Procedures"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
Ns_InfoAddress, Ns_InfoBootTime, Ns_InfoBuildDate, Ns_InfoConfigFile, Ns_InfoErrorLog, Ns_InfoHomePath, Ns_InfoHostname, Ns_InfoLabel, Ns_InfoNameOfExecutable, Ns_InfoPid, Ns_InfoPlatform, Ns_InfoServerName, Ns_InfoServerVersion, Ns_InfoServersStarted, Ns_InfoShutdownPending, Ns_InfoStarted, Ns_InfoTag, Ns_InfoUptime, Ns_PageRoot \- Get server information
.SH SYNOPSIS
.nf
\fB#include "ns.h"\fR
.sp
char *
\fBNs_InfoAddress\fR(\fIvoid\fR)
.sp
int
\fBNs_InfoBootTime\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoBuildDate\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoConfigFile\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoErrorLog\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoHomePath\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoHostname\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoLabel\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoNameOfExecutable\fR(\fIvoid\fR)
.sp
int
\fBNs_InfoPid\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoPlatform\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoServerName\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoServerVersion\fR(\fIvoid\fR)
.sp
int
\fBNs_InfoServersStarted\fR(\fIvoid\fR)
.sp
int
\fBNs_InfoShutdownPending\fR(\fIvoid\fR)
.sp
int
\fBNs_InfoStarted\fR(\fIvoid\fR)
.sp
char *
\fBNs_InfoTag\fR(\fIvoid\fR)
.sp
int
\fBNs_InfoUptime\fR(\fIvoid\fR)
.sp
char *
\fBNs_PageRoot\fR(\fIchar *server\fR)
.BE
.SH DESCRIPTION
.PP
These functions return information about the server.
Many of the functions return pointers to strings or other types of
information which, in most cases, you must not free. These are denoted
as "read-only" in the sections below.
.TP
\fBNs_InfoAddress\fR()
Return the server IP address of the server. The IP address is defined
in the server configuration file. The IP address is returned as a
string pointer which you must treat as read-only. If you want to
alter the string, you must use \fBns_strdup\fR to copy the string
to another location in memory and modify that instead.
.TP
\fBNs_InfoBootTime\fR()
Return the time that the server was started as an int. Treat the
result as time_t.
.TP
\fBNs_InfoBuildDate\fR()
Return the date and time that this server was compiled as a string
pointer. Treat the result as read-only.
.TP
\fBNs_InfoConfigFile\fR()
Return the absolute path name of the configuration file in use as
a string pointer. Treat the result as read-only.
.TP
\fBNs_InfoErrorLog\fR()
Return the name of the error log as a string pointer. Treat the
result as read-only. The name may be just a name, a relative path
or an absolute path depending on how it is defined in the server
configuration file.
.TP
\fBNs_InfoHomePath\fR()
Return the absolute directory path where AOLserver is installed as
a string pointer. Treat the result as read-only.
.TP
\fBNs_InfoHostname\fR()
Return the hostname of the host that AOLserver is running on as a
string pointer. The \fBgethostname\fR(2) function is used. If
\fBgethostname\fR(2) fails to return a hostname, "localhost" is
used instead. Treat the result as read-only.
.TP
\fBNs_InfoLabel\fR()
Return the source code label for AOLserver as a string pointer.
Statically defined in the source code. If no label was used,
"unlabeled" is returned. You can use these functions to provide the
source code label when you report problems with the server. Treat
the result as read-only.
.TP
\fBNs_InfoNameOfExecutable\fR()
Return the name of the running executable as a string pointer. Treat
the result as read-only.
.TP
\fBNs_InfoPid\fR()
Return the pid of the running AOLserver executable as an int.
.TP
\fBNs_InfoPlatform\fR()
Return the platform name as a string pointer, e.g. "linux". Treat
the result as read-only.
.TP
\fBNs_InfoServerName\fR()
Return the AOLserver name string, e.g. "AOLserver". Statically
defined in the source code. Treat the result as read-only.
.TP
\fBNs_InfoServerVersion\fR()
Return the AOLserver version string, e.g. "3.5.2". Statically defined
in the source code. Treat the result as read-only.
.TP
\fBNs_InfoServersStarted\fR()
Return TRUE if the server has started, i.e., if initialization and
module loading is complete. This is a compatibility function that
calls \fBNs_InfoStarted\fR.
.TP
\fBNs_InfoShutdownPending\fR()
Return TRUE if there is there a shutdown pending, i.e. if an INTR
signal has been received or if \fBns_shutdown\fR has been called.
.TP
\fBNs_InfoStarted\fR()
Return TRUE if the server has started, i.e., if initialization and
module loading is complete.
.TP
\fBNs_InfoTag\fR()
Return the CVS tag of this build of AOLserver. Statically defined
in the source code. The value may be meaningless. Treat the result
as read-only.
.TP
\fBNs_InfoUptime\fR()
Return how long, in seconds, AOLserver has been running.
.TP
\fBNs_PageRoot\fR(\fIserver\fR)
Return the path name of the AOLserver pages directory for a particular
server as a string pointer. The \fIserver\fR argument is not used.
Treat the result as read-only.
.SH "SEE ALSO"
nsd(1), info(n)
.SH KEYWORDS
|