# Configuration on Linux*

- Overview

- Command-Line Interface

- The asfd Script

## Overview

Use the command-line interface (asfcli) to enable and configure ASF on your system. In addition, the supplied asfd script can be used to control the loading and unloading of the ASF daemon.

### Configurable Settings

Table 1 lists the ASF configurable settings.

Table 1. Configurable Settings

Setting | Description
ASF enabled/disabled | Whether ASF operation is enabled or disabled.
De-assertionEventMask | This setting determines if an alert is cleared. An alert can be cleared up to and including eight times.
Destination Address | IP address of the management station.
SNMP Community String | Identifier that matches the client computer with the remote management application.
Alert Destination Ping enabled/disabled | When ASF is enabled, enables sending a standard Internet Control Message Protocol (ICMP) ping packet to the management station.
Alert Destination Ping <interval> | When the Alert Destination Ping is enabled, this setting determines the time between pings to the management station.
Presence Heartbeats enabled/disabled | When ASF is enabled, enables a hardware-generated pulse from the client that the management station may monitor to determine if the client is present on the network.
Presence Heartbeat Interval | Time between heartbeat pulses from the client.
Retry Count | Number of times the client will send an alert. Retransmission helps ensure that Simple Network Management Protocol (SNMP) management packets, which are low priority, reach the remote management application, and are not dropped by an overloaded network switch or router buffer. If your network management application is not receiving alerts, you may need to increase RetryCount.
Retry Interval | Number of seconds between alert retransmissions.
Watchdog Enable | When ASF is enabled, enables the Watchdog timer.
Watchdog Interval | Time between Watchdog timer pulses.
ASF Sensor Monitoring Enable | When ASF is enabled, enables ASF sensor monitoring.
ASF Sensor Monitoring Interval | Time between monitor timer pulses.
Link_Reconnect_Count | When link is temporarily lost and then restored, common with a Spanning tree event, ASF Agent detects that network link is restored and tries to reconnect to the Management Console. The ASF Agent sends (ICMP) Pings to the Management Console using the values specified by this parameter. The IT Administrator needs to take into account the general network traffic when link is restored, and how quickly the IT Administrator wants to send ASF Alerts.
Link_Reconnect_Interval | When link is temporarily lost and then restored, common with a spanning tree event, the ASF Agent detects when link is restored and tries to send alerts as quickly as possible to the Management Console. When network link is restored, ASF Agent accelerates the Network Pings by the value specified by the "Link_Reconnect_Interval" parameter. This continues for the time specified in the "Link_Reconnect_Interval" X "Link_Reconnect_Count". After this time, the ASF Agent returns to sending (ICMP) Pings to the Management Console every Proxy Ping Interval.
Send_Pet_Delay | When link is temporarily lost and then restored, common with a spanning tree event, ASF Agent detects when link is restored. ASF Agent may wait to send Alerts to the Management Console knowing that Intel's 82541 EM and 82547EM devices will store the ASF Alerts. The Change to "Send_Pet_Delay" parameter specifies the amount of time that ASF waits after link is restored before sending alerts to the Management Console. This parameter allows the IT Administrator to avoid sending alerts when network traffic is high. NOTE: Not all Intel devices store ASF alerts, and with those devices, this parameter should be set to zero so that ASF Alerts are sent as quickly as possible.
Set ASF Security Keys | Set the ASF 2.0 security keys. Security keys should be 40 characters long. Acceptable characters are A..F, 0..9.

## Command-Line Interface: asfcli

To launch the command-line interface , run the asfcli command.

Use the command as follows:
asfcli [options]
As shown above, the asfcli command accepts optional parameters, and these are listed in table 2:

Table 2. asfcli Optional Parameters

Option | Description
init | Initializes the internal structures of the agent.
timers | Shows heartbeat, watchdog, ASF sensors, and management console pinging settings.
adapters | Lists the available adapters for alerting.
status | Displays alerting status information.
funcs | Displays a list of supported remote control functions and their state (enabled/disabled).
sethb <interval> | Sets the interval for heartbeat messages (in seconds). If interval is 0, heartbeat is disabled.
setwd <interval> | Sets the watchdog expiration interval (in seconds). If interval is 0, watchdog is disabled.
setping <interval> | Sets the interval between pings to the management console (proxy update). If interval is 0, proxy update is disabled.
setcom <community-string> | Sets the SNMP community string for PET packets.
setfunc <function-id> enabled | disabled | Sets the state of a remote-control function.
setmon <interval> | Sets the ASF sensors monitoring interval.
disable | Disables alerting on the current ASF adapter.
apply [adapter] <proxy> | Applies the configuration and enables ASF on adapter. Sends alerts to the indicated host/IP address. proxy is the management console. If no adapter is specified, the adapter is selected automatically.
version | Displays the asfcli version information.
platform | Checks whether the platform supports ASF 2.0 security.
secadapt <adapter> | Checks whether the adapter is ASF 2.0 security capable.
secfunc <func_id> | Checks whether the remote control function is secure.
haskeys | Checks whether ASF 2.0 security keys are set.
suppfunc <adapter> <func_id> | Checks whether the remote control function is supported on adapter.
setlcping <n> <interval> | Set the interval between pings to proxy (proxy update) on a link change or when proxy is unreachable. n - the number of times to send ping. interval - the delay between them. If n is 0, the timer is disabled.
setkeys <admin> <oper> <gener> <random> | Set ASF 2.0 security keys, each should be 40 characters long (acceptable characters are 0..9, A..F).
setlcpd <interval> | Sets the interval for PET message delay on a link change event in seconds If interval is 0, the timer is disabled.

All configuration parameters such as heartbeat interval and management console IP address are considered system-wide settings. They are not associated with a specific adapter. However, they are configured into the ASF enabled adapter once a call to ApplyConfigAndEnable (apply) function has been made.

### Applying Changes to the Configuration

To reduce access to hardware and overhead, changing the configuration must be completed using the following initialization sequence:

1. Adapter Enumeration
2. Set configuration variables.
3. Apply the configuration by calling the ApplyConfigAndEnable function.
4. Get the configuration status.

After step three, the service access the hardware and changes the configuration settings. All values are saved on the hard disk after the call to ApplyConfigAndEnable and will be used by the Agent when the system is started again.

| NOTE: The DisableAlerting function is applied immediately. It does not require a call to ApplyConfigAndEnable.

The following is a sample of an initialization sequence.

1. Call EnumerateASFAdapters (adapters)
2. Call AsfSetCommunityString (setcom)
3. Call AsfSetWatchdogInfo (setwd)
4. Call AsfSetHeartbeatInfo (sethb)
5. Call ApplyConfigAndEnable (apply)
6. Call AsfGetConfigurationStatus (status)
7. Call AsfGetPingInfo (timers)

Steps 1 and 5 are mandatory. The rest are optional.

### Working with Multiple Adapters and Ports

You are allowed to enable ASF on only one adapter in the system. All other adapters are ASF disabled.

A call to the DisableAlerting function disables ASF on the ASF enabled adapter. After calling DisableAlerting, all adapters in the system are ASF disabled.

To enable a specific adapter, you must make a call to the ApplyConfigAndEnable function using the matching adapter key. Note that as a result of this call, all other adapters are automatically ASF disabled and no other subsequent calls are required.

## The asfd Script

The ASF package includes a script that controls the loading/unloading of the ASF daemon. This script is installed as asfd under /etc/init.d.
The asfd script is also linked to relevant start and kill files in the /etc/rc.d/rcX.d directory. It enables automatic startup and kill of the ASF daemon on various system load and shutdown levels.
Use the following format for enabling asfd commands:
/etc/init.d/asfd options

As shown above, the asfd script expects parameters, and these are listed in table 3:

Table 3. asfd Parameters

Option | Description
start | Starts the ASF daemon (generally not required because the daemon is automatically started when the system boots).
stop | Stops the ASF daemon.
restart | Restarts the ASF daemon.
reload | Restarts the ASF daemon.
status | Displays current status of ASF.
version | Displays version of the ASF package and all the package components.

`Last modified on 7/26/07 1:11p Revision 10 s`