HELIOS PCShare 3.0 User manual


A 4 Technical notes
The following section contains miscellaneous technical information about PCShare which is primarily of interest to experienced system administrators only.
A 4.1 PCShare log files
The following describes the structure of the PCShare printer log file and server log file. Please refer to an appropriate UNIX manual for a description of the "system messages" file. All three files can be inspected by choosing the appropriate item in the Statistics menu in the PCShare Admin.
Printer log file structure
Each entry in the printer log file "$PCDIR/printer.acct" (with the appendices ".0", yesterday to ".6", seven days ago) has the following format:
status, ptrName, "username", "document", startTime, duration, pages, ListOfFonts
where:
status (decimal):
3 general UNIX warning
2 PostScript output
1 UNIX info (e.g. extended print information)
0 OK
-1 communications error
-2 PostScript error
-3 terminated job (e.g. killed signal)
-4 UNIX error (e.g. file not found)

ptrName (string): Logical (UNIX) printer name
"username" (string): From PostScript header of job
"document" (string): The string "document" is - in a PCShare only environment - empty. However, if EtherShare is installed on the same server too, there can appear document names of EtherShare queue print jobs in both PCShare Admin's printer account file and the "$PCDIR/printer.acct" file. For more information see also 5.10.2 "Printer account file".
startTime (decimal): Seconds since 1.1.1970
(UNIX time_t values)
duration (seconds): = endTime-startTime
pages (decimal): = endPage-startPage (for PostScript jobs).
ListOfFonts (string array): Fonts used, space delimited
If status0, the line is followed by the error output of the printer, bracketed by the lines Error output and End error output. Also, if no printable data are sent to the printer (pages=0), then duration will be "0".

Note: The printer status line can also contain extended information (e.g. color separation info) if EtherShare is installed on the same server. If you want to know more about the extended information in the printer status line, please refer to the respective chapter in the EtherShare manual.

User name in print jobs
The user name logged with each print job in the printer log file "$PCDIR/printer.acct" is determined by interrogating the PostScript header of the job for the name in the "%%For" comment.
If the "%%For" comment or the name field is missing, all jobs will be allocated to "nobody" by default.
If a name is specified but it cannot be found in the list of long or short names in "/etc/passwd", the specified (unknown) user name will still appear in the printer log file, but any error messages are sent as mail to "nobody" instead.
The document title is determined by interrogating the PostScript header of the job for the name in the "%%Title" comment.

Note: Due to the inability of the "smbif" to handle document names, the column document will always show none.

Server log file structure
Each entry in the server log file "$PCDIR/server.acct" (with the appendices ".0", yesterday to ".6", seven days ago) has the following format:
status, svrName, ws_address, pe_status, usrname,
startTime, duration, usrTime, sysTime, rusage

where:
status = 1 (normal login)
svrName (string): Server name
ws_address (string): Workstation network address (TCP/IP)
pe_status (decimal): UNIX process exit status (0 = OK; 1-127 = error exit, i.e. the program has been terminated; 128-255 = abnormal termination, ask your system administrator); for 256-65535 see the UNIX command
"man -s2 wait".
usrname (string): User login name
startTime (decimal): Login time, seconds since 1.1.1970 (UNIX time_t values)
duration (seconds): = endTime-startTime

Note: The following entries are not displayed on all platforms:

usrTime (decimal): Processor time consumed by user process
sysTime (decimal): Processor time consumed by the process while in system mode
rusage (decimal array): = resource usage information. The structure is operating system dependent - see the description of "getrusage" in your UNIX documentation. Some of the resource usage fields are decoded and used by the
PCShare Admin in the Server Logfile window.
For more information see also 5.10.1 "Server Log File".
A 4.2 UNIX kernel tuning
This section describes optional tuning procedures which require substantial UNIX experience.
If the PCShare host has plenty of memory, it may be worthwhile adjusting some data structures inside the operating system to be larger than normal. This keeps more information in memory that otherwise may need to be continuously re-read from the disk. Modern operating systems adjust the data structure values depending on the available memory size. See your UNIX documentation for more information.
Solaris 2.x Tuning
The Solaris 2.x operating system has no facilities to rebuild the kernel. Thus parameters are not set by modifying a
C-language source and rebuilding the kernel, but simply by editing a text file. The file "/etc/system" may contain simple statements of the form "set variable=value" to tune system parameters.
The two parameters especially interesting for PCShare are "ufs_ninode" and "ncsize". "ncsize" is not prefixed by "ufs_" because it relates to all file systems, not just the normal UNIX file system. With "ncsize" the number of entries in the directory name look-up cache can be adjusted and with "ufs_ninode" the number of inodes to be cached in memory.
Increasing the number of directory entries or inodes that can be held in memory improves the performance considerably when performing repeated opening and closing of files or directories. Each file that needs to be accessed (directories are files as well) will occupy an inode entry. The inode will be kept around after closing a file or directory in case it will be referenced again, unless the operating system is out of free entries. In the latter case, the entry may not be re-used but is used for a different entry that will be loaded from disk.
Thus, if you have several megabytes of memory to spend, you may increase the values for "ncsize" and "ufs_inode".
In general it is recommended to gather system performance statistics prior and after kernel parameters are adjusted so that positive as well negative changes can be recognized. Note that default settings or the behaviour of the OS automatic adjustment may change between OS versions. See your OS documentation for available tools and adjustable parameters as well their default values.
Other UNIX architextures.
For tuning on other UNIX architectures, please refer to the appropriate and corresponding UNIX documentation. Generally, the sections describing "Performance tuning" in the respective manual may be read carefully.

© 2002 HELIOS Software GmbH