Appendix: Additional inventory operations and troubleshooting

LANDesk Management Suite uses an inventory scanner utility to gather hardware and software information for the devices on your network. For information on inventory scanner basics, see the Managing inventory and Reports chapters. This chapter provides additional information about inventory scanning, as well as some troubleshooting tips.

Read this chapter to learn about:

Scanning custom information

The Windows inventory scanner utility (for Windows 95/98 and Windows NT/2000/2003/XP/Vista/7) automatically scans the device's registry for custom information. When you configure a device, the following keys are installed into the registry:

The inventory scanner always scans the registry for the Custom Fields key and picks up any information it finds under that key. It then enters the custom information into Custom fields in the core database. The information in the Custom Fields keys can be whatever you need it to be. When you view this data in the console, it displays under Custom fields.

The inventory scanner reads two data types:

NOTE: Custom field subkeys
The inventory scanner doesn't scan for any subkeys below Custom fields.

Custom fields string length

ASCII character strings must be no longer than 255 characters. Multi-byte character set (MBCS) strings must be between 127 and 255 characters.

Configuring the scanner to scan registry keys

The inventory scanner can scan for registry keys you specify and add their values to the core database. This can be useful for customized software, asset information, or other information stored in the registry that you want to include in the core database.

To use registry key scanning, add a section at the very beginning of the Ldappl3.template file with this format:

[Registry Info]
KEY=HKLM, Software\Intel\LANDesk, version, MyData - LANDesk - Version

Change the values after KEY= to match the registry key you're looking for. In the example above, notice that each registry key element is separated by commas.

When the inventory scanner retrieves the registry key data, you can view it in the path specified by the last parameter. Each level is separated by " - " (space dash space). To force the scanner to use a 64-bit hive, append 64 to the hive name (for example, HKLM64).

Specifying the software scanning interval and history

You can specify when to scan a device's software and how long to save the inventory changes history log on the core server. These intervals apply to every device.

NOTE: A device's hardware is scanned every time it boots and is connected to the network.

To specify the software scanning settings
  1. In the console's network view, click Configure > Services > Inventory > Software.
  2. Specify the frequency of software scanning.
  3. Specify the number of days to save the history.

NOTE: The core server and software scanning
This feature affects only devices. It doesn't affect the core server, which is always scanned daily.

Scheduling an inventory scan task

If a device is running the Management Suite agents, you can schedule a script that triggers an inventory scan on the device.

To schedule an inventory scan
  1. Click Tools > Distribution > Manage scripts.
  2. Click All other scripts.
  3. From the inventory scanner script's shortcut menu, click Schedule.
  4. Configure task targets and the start time in the Scheduled tasks window.

The inventory scanner script is located in the \Program Files\LANDesk\ManagementSuite\Scripts directory. The script is a Windows .ini file that you can edit with any text editor. If you need to change the options or parameters within the script, open it and follow the instructions contained within it.

Scanner command-line parameters

You can add command-line parameters to the inventory scanner's (ldiscn32.exe) shortcut properties to control how it functions.

The following table lists the scanner's command-line parameters:

Option Description

/NTT=IP

Core server's IP address or DNS name and UDP port. For example, /NTT=123.123.123.123:5007 or /NTT=CORESERVER:5007.

/UDP

Scanner communicates via UDP instead of TCP. Combine this switch with /NTT=[IP].

/NOUI

Forces the scanner to run with no user interface.

/i=inifile

Provides the path (HTTP, UNC), or a drive letter to the master LdAppl3 file. ldiscn32.exe also copies the LdAppl3 file they find in this location to the device's localLdAppl3.ini file. The scanners compare the date of the master LdAppl3 with the local LdAppl3.ini; if the dates don't match, the master file is copied locally.

/d=directory

Starts the software scan in the specified directory. By default, the scan starts in the root directory of each local hard drive.

/L

Sends the scan to the core server the device was configured from. When you use /L, the /NTT parameter isn't necessary.

/sync

Forces a full scan, including a complete software scan. Full scan files can be several megabytes in size.

/n

Doesn't search subdirectories.

/v

Verbose mode.

/Z=retry count

How many times the scanner tries to resend the scan.

/W=wait in seconds

Have the scanner wait the number of seconds specified before starting a scan.

/? or /h

Displays the command-line syntax help.

/s=servername

Specifies the core server to store the inventory data on.

/f or /f-

Forces a software scan regardless of the software scan interval set at the console. Specify /f- to disable a software scan regardless of the software scan interval set at the console.

/t=[path]filename

Copies the contents of the specified file to the core database. Use this option to enter inventory data from standalone devices or from separate inventory files.

/o=[path]filename

Writes inventory data to the specified output file.

/m

Creates a non-unicode ldiscan.mif file in the C:/DMI/DOS/MIFS directory. This file contains the inventory data discovered during the scan.

/muni

(ldiscn32.exe only) Creates a unicode ldiscan.mif file in the directory found in LdAppl3.ini file's MIFPATH. This file contains the inventory data discovered during the scan.

/do16

Enables the 16-bit inventory scanner (inv16.exe) on managed devices.

Scanning standalone devices with a floppy disk

To scan a standalone device
  1. Copy the proper inventory scanner utility and a software description file (usually LdAppl3.ini) to a floppy disk or thumb drive. (You may also need to copy elogapi.dll, ygrep32.dll, locv16vc0.dll, inv16.exe, loc32vc0.dll, ltapi.dll, and ldiscn32.exe.)
  2. Run the scan with the /O= parameter specifying the path and filename of the output file.
  3. At the command-line prompt, enter a unique name for the device. This name appears in the Description field in the core database. For example:

ldiscn32.exe /f /v /o=c:\%computername%.scn

  1. Copy the resulting scan file to the core server's ..\ManagementSuite\ldscan folder so it gets added to the database.
To scan a device that has network access to the core server
  1. Map a drive (N: for instance) to the ldlogon directory of the core server you want the scan to show up in.
  2. Click Start > Run and paste in this command:

N:\LDISCN32.EXE /NTT=CORESERVERNAME:5007 /S="CORESERVERNAME" /I=HTTP://CORESERVERNAME/ldlogon/ldappl3.ldz /V /F /SYNC

Adding inventory records to the core database

You can add inventory information from a standalone device or separate inventory files by running the inventory scanner from the operating system command line.

To add inventory records from a file to the core database

Adding BIOS text strings to the core database

There is a section in the LdAppl3.Template file called [BIOS Info]. This section provides the capability to search for information inside the BIOS of a computer. You can add one or more entries to the [BIOS Info] section. These entries define new keys in the core database and provide parsing instructions to the inventory scanner. The parsing instructions identify where to look in the LDBIOS.TXT file for a specific string. Using these instructions, the inventory scanner populates the core database with the strings from the LDBIOS.TXT file.

The inventory scanner uses a parsing method to locate BIOS information. This allows you to search for information one or more lines away from a specified text string. Such a search would enable you to locate random letter and number combinations assigned to computer hardware.

Text strings in LDBIOS.TXT

If you run the inventory scanner with the /do16 command line parameter, during an inventory scan, the text strings available in the BIOS are exported to a text file called LDBIOS.TXT. LDBIOS.TXT stores all of the strings that are created by the scanner. If you want to store this information in the database, you can store it as a configuration file by using the CFGFILES parameter in Ldappl3.ini.

Sample of BIOS entries in the LdAppl3.Template file

Here is an example from the [BIOS Info] section in the Ldappl3.Template file:

[BIOS Info]

StringLength=4

Key = BIOS - Manufacturer

Parameters = AllValues,FirstInstance

Value = AMI|American Megatrends::AMI::BIOS - AMI

Value = Copyright.*Dell::Dell::BIOS - Dell

[BIOS - AMI]

Key = % - Version

Parameters = FirstValue,FirstInstance

Value = BIOS Version \(.*\)::\1

Key = % - Copyright Notice

Parameters = AllValues,AllInstances

Value = ©.*\(AMI|American Megatrends\)

[BIOS - Dell]

Key = % - Version

Parameters = FirstValue,FirstInstance

Value = BIOS Version \(A.+\)::\1

Value = BIOS Version: \(A.+\)::\1

Key = % - Copyright Notice

Parameters = AllValues,AllInstances

Value = ©.*Dell|[Cc]opyright.*Dell

Understanding BIOS entries

Entries in the [BIOS Info] section consist of the following:

Creating MIF files

If you need a MIF file that stores a device's inventory information, you can create one by running the appropriate scanner at the command line.

To create a unicode MIF file, use the /MUNI option. To create a non-unicode MIF file, use the /M option.

To create MIF files

LDISCN32/MUNI/V

Scanning NetWare servers

Management Suite uses LDISCAN.NLM to scan NetWare servers for hardware and software information. The command-line syntax for LDISCAN.NLM is:

LOADLDISCAN[.NLM]INV_SERV=servername
NTI=IPXaddressFILE=path[TIME=#][SCANNOW][MIF]

The following table lists the command-line parameters that you can use with the NetWare scanner.

Option Description

INV_SERV = serenade

Directs the results of the scan to the specified server. The specified server must be running the inventory service.

NTT = IP address

Gives the IP address of the core server to send the inventory information to.

FILE = path

Lists the path to the LDAPPL3.INI file.

TIME = #

Sets the time of day for the server hardware scan in whole hours. The clock is in military time, so 0 = midnight and 23 = 11 p.m. Configure software scans in Options > Software Scanning. The default is 8 p.m.

SCANNOW

Forces an core server scan at the time the NM is loaded.

MIF

Creates the LDISCAN.MIF file for the core server. The .MIF file contains the inventory information gathered from the server.

To load LDISCAN.NLM on a NetWare server

For example, to scan a server daily and record its inventory data in the core database on "Server1," enter:

LOADLDISCANINV_SERV=SERVER1TIMEWORK NUMBER:NODEADDRESS:SOCKETFILERS:MONEYCHANGER

To unload LDISCAN.NLM from a server, enter:

UNLOADLDISCAN

Scheduling NetWare server scans

LDISCAN.NLM scans recur every day as specified by the TIME=# parameter. The TIME parameter is set in military time, so 0 is midnight and 23 is 11 p.m. The default is 8 p.m.

To change the time for server scans

Editing the LdAppl3.Template file

Information relating specifically to the scanner's inventory parameters is contained in the LdAppl3.Template file. This template file works with the LdAppl3 file to identify a device's software inventory.

You can edit the template file's [LANDesk Inventory] section to configure the parameters that determine how the scanner identifies software inventory. By default, LdAppl3.Template is located in this directory on the core server:

Use this table as a guide to help you edit the [LANDesk Inventory] section in a text editor.

Option Description

Mode

Determines how the scanner scans for software on devices. The default is Listed. Here are the settings:

  • Listed: Records the files listed in LdAppl3.

  • Unlisted: Records the names and dates of all files that have the extensions listed on the ScanExtensions line but that are not defined in the LDAPPL3. This mode helps discover unauthorized software on the network.

  • All: Discovers files with extensions listed on the ScanExtensions line.

Duplicate

Records multiple instances of files. Set the value to OFF to record only the first instance, or ON to record all detected instances. The default is ON.

ScanExtensions

Sets the file extensions (.exe, .com, .cfg, etc.) that will be scanned. Use a space to separate the file extensions. By default, only .exe files are scanned.

Version

Is the version number of the LdAppl3 file.

Revision

Is the revision number of the LdAppl3 file; helps ensure future compatibility.

CfgFiles 1-4

Records the date, time, file size, and contents of the specified files. You can leave out the drive letter (for example, c:) if you want to search all local drives. You can specify more than one file on each of the four lines, but the line length is limited to 80 characters.

Separate path names on the same line by a space.

The scanner compares the date and size of the current file with that of the previous scan. If the date and size don't match, the scan records the contents of the file as a new revision.

ExcludeDir 1-3

Excludes specific directories from a scan. You can leave out the drive letter (for example, c:) if you want to exclude all local drives. Enumeration must start at 1 and be continuous. You can use environment variables in this format: "%varname%". You can use a wildcard (*) in a "begins with" form only ( ExcludeDir=%windir%\$NtUninstall*\ ). You must end each line with "\".

MifPath

Specifies where MIF files are stored on a device's local drive. The default location is c:\DMI\DOS\MIFS.

UseDefaultVersion

If set to TRUE, the scanner reports a match when a file matches an exact filename and file size entry in LdAppl3 on filename only (the version will be reported as EXISTS). This can cause some false positives for applications that share a common filename with an unknown application. In the as-delivered LdAppl3.Template file, this parameter is set FALSE; that is, only add an entry if the match is exact. If the parameter is missing, it defaults to TRUE.

SendExtraFileData

If set to TRUE, sends extra file data to the core server. The default is FALSE. This means that by default, only path, name, and version are entered into the core database.

To edit the LdAppl3.Template file
  1. From your core server, go to the LDLogon directory and open LDAPPL3.TEMPLATE in Notepad or another text editor.
  2. Scroll down to the parameter you want to update and make your changes.
  3. Save the file.
  4. In the console, click Tools > Reporting/Monitoring > Software License Monitoring.
  5. Click the Make Available to Clients toolbar button to make the most recent changes available to devices the next time they run an inventory scan if the /i scanner command line parameter is used on devices.

Troubleshooting the inventory scanner

This section describes common inventory scanner problems and possible solutions.

The inventory scanner hangs

A device's hardware scans correctly, but its software doesn't

The network view provides inventory data for only some devices

To view device information, ensure that your devices have been scanned into the core database. Devices appearing without information haven't been scanned into the core database.

To view a device's inventory data in the network view
  1. Configure the device.
  2. Scan the device into the core database.

For more information about configuring devices, see Configuring device agents.

For more information about scanning devices, see Managing inventory.

Specifying the number of days to keep inventory scans

By default, the core server keeps inventory scans for devices until you delete them. You can have the core delete inventory scans for devices if the device hasn't submitted a scan for the number of days you specify. Doing this can remove devices that are no longer on your network.

To specify the number of file revisions to keep in the core database
  1. Click Configure > Services > Inventory.
  2. Specify the number of days you want to keep inventory scans.
  3. Click OK.

Changes to the way the inventory scanner gathers BIOS information

Beginning with Management Suite 8.7 SP3, the inventory scanner no longer uses the 16-bit inventory scanner to gather some BIOS information. By default, the scanner no longer reports on motherboard bus number, motherboard bus device attributes, and the size of attached floppy drives. Also, the inventory scanner no longer creates a hidden LDBIOS.TXT file on managed devices containing a list of BIOS strings.

If you want the inventory scanner to once again report on these options and create the LDBIOS.TXT file, you can run the inventory scanner with the /do16 switch.

Scanning for custom data on Macintosh devices

You can now gather custom data from devices running the LANDesk agent for Macintosh and process it into inventory. The information is saved in XML files within a specific directory on the client device. Use the information below to create custom data XML files in the correct location to be processed into inventory.

For information on an alternate custom data solution for Macintosh, download the custom data for Macintosh white paper from http://community.landesk.com/support/docs/DOC-1570.

NOTE: The implementation of custom data with the LANDesk agent for Macintosh doesn't use custom data forms. Custom data form tasks can't be deployed successfully to devices running the LANDesk agent for Macintosh.

Custom data XML file

Before you can add custom data to an inventory scan from a device running the LANDesk agent for Macintosh, you must first create a custom data XML file in the proper format. This section outlines the correct format to enable a custom data XML file to be processed without error.

Custom data XML file rules

XML files used to store custom data must comply with the following rules. Custom data XML files that do not correspond with all rules will not be processed into inventory.

Phone Numbers.xml

<?xml version="1.0" encoding="UTF-8"?>

<Home>(123) 456-7890</Home>

<Phone_Numbers></Phone_Numbers>

<Phone_Numbers><Home>(123) 456-7890</Home></Phone_Numbers>

<Home></Home>

<Phone_Numbers><Home></Home><Work></Work></Phone_Numbers>

Single-entry custom data XML file

Custom data XML files can be created to insert a single entry into the custom data section of inventory. To do this, the tags of each element in a custom data XML file must be named with the string that is to be displayed in inventory. Then the set of elements must be nested in parent elements with tags named to represent the string that is to be displayed under custom data in the tree view in inventory.

For example, if a custom data XML file were to be used to collect telephone numbers, the following XML format would result in the inventory record pictured below:

<?xml version="1.0" encoding="UTF-8"?>

<Phone_Numbers>

<Work>123-456-7890</Work>

<Mobile>(123) 456-7890</Mobile>

<Home>1234567890</Home>

<Other>N/A</Other>

<Preference>Work</Preference>

</Phone_Numbers>

Multiple-entry custom data XML file

Custom data XML files can be created to insert multiple entries into the custom data section of inventory. To do this, the tags of each element in a custom data XML file must be named with the string that is to be displayed in inventory. Then each set of elements must be nested in parent elements with tags named to represent the string that is to be displayed under custom data in the tree view in inventory.

For example, if a custom data XML file were to be used to collect employee information, the following XML format would result in the inventory record pictured below:

<?xml version="1.0" encoding="UTF-8"?>

<Phone_Numbers>

<Work>123-456-7890</Work>

<Mobile>(123) 456-7890</Mobile>

<Home>1234567890</Home>

<Other>N/A</Other>

<Preference>Work</Preference>

</Phone_Numbers>

<Addresses>

<Work_Address_1>123 Maple St.</Work_Address_1>

<Work_Address_2>Suite 550</Work_Address_2>

<Work_Address_3></Work_Address_3>

<Work_City>St. Louis</Work_City>

<Work_State>MO</Work_State>

<Work_ZIP_Code>63102</Work_ZIP_Code>

<Home_Address_1>456 Elm Way</Home_Address_1>

<Home_Address_2></Home_Address_2>

<Home_Address_3></Home_Address_3>

<Home_City>St. Louis</Home_City>

<Home_State>MO</Home_State>

<Home_ZIP_Code>63102</Home_ZIP_Code>

</Addresses>

<Employee_Information>

<Title>Sales Representative</Title>

<Employee_ID>4562</Employee_ID>

<Manager>Bob Smith</Manager>

<E-Mail>John.Doe@WidgetsNMore.com</E-Mail>

</Employee_Information>

Custom data directory

Every custom data XML file to be processed into inventory must be saved in the custom data directory, which is located at /Library/Application Support/LANDesk/CustomData on every device running the LANDesk agent for Macintosh.

After a custom data XML file has been processed into inventory, the file remains in the CustomData directory. This allows for subsequent full scans (and delta scans with Force software scan enabled) to include information from custom data XML files saved in the custom data directory.

Inventory

During the software portion of an inventory scan, a check is made of the CustomData directory. Any XML files in the CustomData directory will be processed into custom data and included in the inventory scan sent to the core.

Inventory scan types

Custom data XML files that are in the CustomData directory are processed during all full scans, and are also processed during delta scans that include software scanning.

Inventory logging

The portion of an inventory scan that looks for and processes custom data XML files is recorded in LANDesk.log as ldscan : Scanning for custom data. If the custom data XML files in the CustomData directory are formatted properly, there will be no further entries in LANDesk.log regarding custom data. However, if there is an error, it will be recorded in LANDesk.log as ldscan: Error opening or loading the CustomData file:filename.xml as XML.

An error while processing a custom data XML file will not prevent other custom data XML files saved in the custom data directory from being processed. Likewise, errors processing custom data XML files will not prevent an inventory scan from completing or being sent to the core.

Inventory on the core

Custom data information in inventory, for a device running the LANDesk agent for Macintosh, will be updated when the custom data XML files containing information are updated and an inventory scan that updates custom data is executed on the client.

Be aware that custom data information removed from custom data XML files is not removed from inventory records on the core. To remove unwanted custom data information from an inventory record on the core, delete the record and send a new full scan from the device that the record represented.