The text of a manual · part 15 of 49
Cyclades-TS User Guide: Chapter 3 - Additional Features, pages 137 to 146
Pages 137 to 146 of 454, from Cyclades-TS User Guide
The original document is the PDF (4.3 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Cyclades TS2000 and Avocent TS2000
Page 137
Chapter 3 - Additional Features Table 9: Cyclades-TS configuration for Slave 2 (where it differs from the CAS standard) Parameter
Value for this example all.protocol socket_server all.authtype none conf.eth_ip
20.20.20.3 all.socket_port
7301+
To access ports from the remote management workstation, use telnet with the secondary IP address: telnet 209.81.55.110 7001 to access the first port of the Master Cyclades-TS. telnet 209.81.55.110 7033 to access the first port of Slave 1. telnet 209.81.55.110 7301 to access the first port of Slave 2. Ssh can also be used from the remote management workstation: ssh -l <username>:Server_on_slave2_serial_s3 209.81.55.110 to access the third port of Slave 2, or ssh -l <username>:7305 209.81.55.110 to access the fifth port of Slave 2. (Thus the Cyclades-TS family does not have this feature.)
User Guide
137
Page 138
CronD
CronD CronD is a service provided by the Cyclades-TS system that allows automatic, periodically-run custom-made scripts. It replaces the need for the same commands to be run manually.
Parameters Involved and Passed Values The following parameters are created in the /etc/crontab_files file: status
Active or inactive. If this item is not active, the script will not be executed.
user
The process will be run with the privileges of this user, who must be a valid local user.
source
Pathname of the crontab file that specifies frequency of execution, the name of shell script, etc. It should be set using the traditional crontab file format.
Example: The name of the shell script with the commands to be executed is /etc/teste_cron.sh. The name of the crontab file is /etc/crontab_tst and it contains one line: 0-59 * * * * /etc/test_cron.sh Insert the follow line in the /etc/crontab_files: active root /etc/crontab_tst Result: CronD will execute the shell script teste_cron.sh with root privileges each minute.
Note: In /etc/crontab, you can only have one active entry per user. For instance, from the example above, you cannot add another active entry for root because it already has an entry. If you want to add more scripts, you can just add them to the source file (/etc/crontab_tst).
138
Cyclades-TS
Page 139
Chapter 3 - Additional Features Configuration for CAS, TS, and Dial-in Access Important! After creating the shell script and crontab file and modifying the crontab_files file, make sure the file named /etc/config_files contains the names of all files that should be saved to flash. Run the command saveconf after this confirmation.
vi Method The files Crontab and shell script are created and the file /etc/crontab_files is modified as indicated. To use cronD: Step 1:
Create the files for every process that it will execute:
Step 2: Create a line in the file /etc/crontab_files for each process to be run. Step 3: Update the system. The next step is to update the system with the modified data. Make sure the file named /etc/config_files contains the names of all files that should be saved to flash. Step 4: Run saveconf. The command saveconf, which reads the /etc/config_files file, should then be run. saveconf copies all the files listed in the file /etc/config_files from the ramdisk to /proc/flash/script. Step 5: Reboot the Cyclades-TS.
Browser Method To configure CronD with your browser: Step 1: Point your browser to the Console Server. In the address or location field of your browser type the Console Access Server’s IP address. For example: http://10.0.0.0
User Guide
139
Page 140
Data Buffering Step 2: Log in as root and type the Web root password configured by the Web server. This will take you to the Configuration and Administration page. Step 3: Click on the Edit Text File link. Click on this link on the Link Panel. You can then pull up the appropriate file and edit it.
Figure 24: Edit Text File page
Data Buffering Introduction Data buffering can be done in local files or in remote files through NFS. When using remote files, the limitation is imposed by the remote Server (disk/partition space) and the data is kept in linear (sequential) files in the remote Server. When using local files, the limitation is imposed by the size of the available ramdisk. You may wish to have data buffering done in file, syslog or both. For syslog, all.syslog_buffering and conf.DB_facility are the parameters to be dealt with, and syslog-ng.conf file should be set accordingly. (Please see Syslog for the syslog-ng configuration file.) For the file, all.data_buffering is the parameter to be dealt with. Conf.nfs_data_buffering is a remote network file system where databuffering will be written, instead of using the default directory /var/run/DB.When commented, it indicates local data buffering. The directory tree to which the file will be written must be NFS-mounted and the local path name is /mnt/DB_nfs. The remote host must have NFS installed and the administrator must create, export, and allow reading/writing to this directory. The size of this file is not limited by the value of the parameter s1.data_buffering,though the value cannot be zero since a zero value turns off data buffering.
140
Cyclades-TS
Page 141
Chapter 3 - Additional Features The conf.nfs_data_buffering parameter format is: <server name or IP address>:<remote pathname> If data buffering is turned on for port 1, for example, the data will be stored in the file ttyS1.data (or <serverfarm1>.data if s1.serverfarmwas configured) in local directory /var/run/DB or in remote path name and server indicated by the conf.nfs_data_buffering.
Ramdisks Data buffering files are created in the directory /var/run/DB. If the parameter s<nn>.serverfarm is configured for the port <nn>, this name will be used. For example, if the serverfarm is called bunny, the data buffering file will be named bunny.data. The shell script /bin/build_DB_ramdisk creates a 48 Mbyte ramdisk for the TS3000. Use this script as a model to create customized ramdisks for your environment. Any user-created scripts should be listed in the file /etc/user_scripts because rc.sysinit executes all shell scripts found there. This avoids changing rc.sysinit itself.
Linear vs. Circular Buffering For local data buffering, this parameter allow users to buffer data in either a circular or linear fashion. Circular format (cir) is a revolving buffer file that is overwritten whenever the limit of the buffer size (set by all.data_buffering) is reached. In linear format (lin), data transmission between the remote device and the serial port ceases once the 4k bytes Rx buffer in the kernel is reached. Then if a session is established to the serial port, the data in the buffer is shown (dont_show_DBmenu must be 2), cleared, and data transmission is resumed. Linear buffering is impossible if flow control is set to none. Default is cir.
Parameters Involved and Passed Values Data Buffering uses the following parameters:
User Guide
141
Page 142
Data Buffering all.data_buffering
A non zero value activates data buffering (local or remote, according to what was configured in the parameter conf.nfs_data_buffering). If local data buffering, a file is created on the Cyclades-TS; if remote, a file is created through NFS in a remote server. All data received from the port is captured in this file. If local data buffering, this parameter means the maximum file size (in bytes). If remote, this parameter is just a flag to activate (greater than zero) or deactivate data buffering. When local data buffering is used, each time the maximum is reached the oldest 10% of stored data is discarded, releasing space for new data (FIFO system) - circular file. When remote data buffering is used, there's no maximum file size other than the one imposed by the remote server - linear file. This file can be viewed using the normal UNIX tools (cat, vi, more, etc.). Size is in bytes not kilobytes.
conf.nfs_data_buffering
This is the Remote Network File System where data captured from the serial port will be written instead of being written to the local directory /var/run/ DB. The directory tree to which the file will be written must be NFS-mounted, so the remote host must have NFS installed and the administrator must create, export and allow reading/writing to this directory. The size of this file is not limited by the value of the parameter all.data_buffering, though the value cannot be zero since a zero value turns off data buffering. The size of the file is dependent on the NFS server only (hard drive, partition size, etc.).
142
Cyclades-TS
Page 143
Chapter 3 - Additional Features all.DB_mode
When configured as cir for circular format, the buffer is like a revolving file that is overwritten whenever the limit of the buffer size (as configured in all.data_buffering or s<n>.data_buffering) is reached. When configured as lin for linear format, once 4k bytes of the Rx buffer in the kernel is reached, a flow control stop (RTS off or XOFFdepending on how all.flow or s<n>.flow is set) is issued to prevent the serial port from receiving further data from the remote. Then when a session is established to the serial port, a flow control start (RTS on or XON) will be issued and data reception will then resume. If all.flow or s<n>.flow is set to none, linear buffering isn’t possible. Default is cir.
all.DB_user_logs
When "on", a line containing the time stamp, the username, the event itself (connection/disconnection) and the type of session (Read/Write or Read Only) will be added to the data buffering file every time a user connects or disconnected to the corresponding port. The log message has the following formats : 1) "<connect> [timestamp] [username] [session type] </connect>" 2)"<disconnect> [timestamp] [username] </disconnect>". when [timestamp] = "YYYY-MM-DD hh:mm:ss" [session type] = "Read/Write" or "Read_Only" all.syslog_buffering
User Guide
When nonzero, the contents of the data buffer are sent to the syslog-ng every time a quantity of data equal to this parameter is collected. The syslog level for data buffering is hard coded to level 5 (notice) and facility is local plus conf.DB_facility. The file /etc/syslog-ng/syslog-ng.conf should be set accordingly for the syslog-ng to take some action.
143
Page 144
Data Buffering all.syslog_sess
This parameter determines whether syslog is generated when a user is connected to the port or not. Originally, syslog is always generated whether the user is connected to the port or not. Now, users have the option to NOT have syslog generate messages when they connect to a port. This feature does not affect the local data_buffering file. When set to 0 (default), syslog is always generated. When set to 1, syslog is only generated when the user is NOT connected to the port sending the data. When the user does connect to the port that is sending data, syslog messages won't be generated.
all.dont_show_DBmenu
When zero, a menu with data buffering options is shown when a nonempty data buffering file is found. When 1, the data buffering menu is not shown. When 2, the data buffering menu is not shown but the data buffering file is shown if not empty. When 3, the data buffering menu is shown, but without the erase and show and erase options.
all.DB_timestamp
Records the time stamp in the data buffering file (1) or not (0). If it is configured as 1, the software will accumulate input characters until it receives a CR and LF from the serial port or the accumulated data reaches 256 characters. Either way, the accumulated data will be recorded in the data buffering file along with the current time. The parameter all.data_buffering has to be with a non-zero value for this parameter to be meaningful.
Configuration for CAS vi Method Files to be modified: • pslave.conf
• syslog-ng.conf
Browser Method To configure Data Buffering with your browser: 144
Cyclades-TS
Page 145
Chapter 3 - Additional Features Step 1: Point your browser to the Console Server. In the address or location field of your browser type the Console Access Server’s IP address. For example: http://10.0.0.0 Step 2: Log in as root and type the Web root password configured by the Web server. This will take you to the Configuration and Administration page. Step 3: Select the Serial Ports link. Click on the Serial Ports link on the Link Panel to the left of the page or in the Configuration section of the page. This will take you to the Port Selection page. Step 4: Select port(s). On the Port Selection page, choose all ports or an individual port to configure, from the dropdown menu. Click the Submit button. This will take you to the Serial Port Configuration page. Step 5: Scroll down to the Data Buffering section. You can change the settings in this section.
Figure 25: Data Buffering section of the Serial Port Configuration page Step 6: Click the Submit button. Step 7: Select the General link. Click on the General link on the Link Panel to the left of the page. User Guide
145
Page 146
Data Buffering Step 8: Scroll down to the Data Buffering section. Choose whether NFS will be used or not, and choose the Data Buffering Facility level here.
Figure 26: Data Buffering section of the General page
Step 9: Click the Submit button. Step 10: Make the changes effective. Click on the Administration > Run Configuration link, check the Serial Ports/Ethernet/Static Routes box and click on the Activate Configuration button. Step 11: Click on the link Administration > Load/Save Configuration. Step 12: Click the Save Configuration to Flash button.
Wizard Method Step 1: Bring up the wizard. At the command prompt, type the following to bring up the Data Buffer custom wizard: wiz --db
Screen 1: *********************************************************** ********* C O N F I G U R A T I O N W I Z A R D ********* ***********************************************************
146
Cyclades-TS