Lesson 19: Uploading files using SIRT

This lesson assumes you have completed all preceding lessons. See Lesson 1: Creating a consolidated database.

In this lesson, you upload files from the remote device using a server-initiated remote task (SIRT). Uploading files from the remote device is useful for troubleshooting because an administrator can examine the files for problems.

When you started the MobiLink Agent on the remote device, you directed it to log messages to the file agent.txt. You are now going to retrieve and examine that file from the remote device.

 Upload files
  1. In the Folders view of Sybase Central under MobiLink 12, expand Central Admin Tutorial, right-click Remote Tasks and click New » Remote Task.

    The Create Remote Task Wizard appears.

  2. On the Welcome page, type Upload Agent Log in the Name field.

  3. Clear This Task Requires Or Creates A Remote Database if it is selected and click Finish.

  4. Click the new task in the Folders view and add a command to the task. Set the Command Type to Upload File.

  5. Set the Server File Name to {agent_id}\agent.txt and the Remote File Name to {agent_log}. You can use the ellipsis (three dots) button in the command editor to easily enter the macro values.

    The {agent_log} macro is replaced by the name of the log file being kept by the MobiLink Agent on the remote device.

    In the Server File Name field you specified the directory where the file is located using the {agent_id} macro. This is very important. If you do not use a macro when specifying the server file name, then every Agent that executes the task places their upload file in the same place, with each new Agent overwriting the file written by the previous agent. Using a macro ensures that each Agent uploads its log file to a different location on the server, allowing you to view all the log files.

  6. Right-click the new Upload Agent Log task and click Deploy. Click Next.

  7. For Recipients, click Specific Agents and then select agent AID_JOHN. Click Next.

  8. On the Delivery Options page, click The Next Time The Agent Synchronizes and click Next.

  9. On the Reporting Results And Status page, set both If Task Succeeds and If Task Fails to Send Results And Status Immediately. Click Finish.

  10. The task needs to be initiated by the administrator in Sybase Central. To initiate the task, go to AID_JOHN under Agents. In the pane, select the Tasks tab, right-click the Upload Agent Log task and click Initiate. Wait for the task to execute.

    The uploaded file is placed in the MobiLink upload directory that was specified it with the -ftru option on the MobiLink command line. You specified c:\cadmin_demo\consolidated\upload for the upload directory. Take a look at that directory using a command prompt or the Windows Explorer. You should find the AID_JOHN subdirectory. In that subdirectory is the agent.txt file that you uploaded.