Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

ftshwl

&pagelevel(3)&pagelevel

Note on usage

Function: Display log records and offline log files

User group: FT user and FT, FTAC and ADM administrator

Functional description

With ftshwl, you can obtain information on all openFT requests logged up to now by openFT. In addition, you can output the names of the current log file and the offline log files.

You can display all log records entered under your own login name.

If you are the FT, FTAC or ADM administrator, you can view log records of all user IDs. The log records are stored in the file syslog.Lyymmdd.Lhhmmss. This file is located in the log directory of the relevant openFT instance, see also section “Instance identification”. yymmdd is the date (year, month, day) and hhmmss the time (hour, minute, second for GMT) at which the file was created.

In the case of the standard instance, the pathname of the log directory is /var/openFT/std/log/syslog (Unix systems) and C:\ProgramData\Fujitsu Technology Solutions\openFT\var\std\log (Windows systems), respectively. For details on newly created instances, see the command ftcrei .

The log records are marked as FT, FTAC and ADM log records respectively, which means that you can determine the type of log record from the output.

For every request, there is an FTAC log record in which you can find the result of the FTAC admission check. For transfer requests, openFT logs whether it was actually able to execute this request in FT log records and for remote administration requests in ADM log records.

If no options are specified, openFT outputs the current log record. If options are specified, openFT outputs all log records up to the time specified in the command in reverse chronological order, i.e. starting from the most recent record to the oldest record.

The polling options allow you to specify that the output of new log records is to be repeated at regular intervals.

There are three types of output: short output, long output and CSV output (Character Separated Value).

Output is written to standard output, see also the note on Unix systems at the description of the -fn option.

Format

ftshwl -h |

[ <user ID> | @a]
[ -lf=<file name1..512> | -tlf=yyyymmdd[hh[mm[ss]]] ]
[ -plf=<0..3> ]
[ -rg=[[[[yyyy]mm]dd]hhmm|#1..999999999999|0..999|:0..999][-

[[[[yyyy]mm]dd]hhmm|#1..999999999999|0..999|:0..999]]]

[ -rt=[t][c][a] ]
[ -ff=[t][T][m][r][d][a][C][D][M][l][f] ]
[ -ini=l | -ini=r | -ini=lr | -ini=rl ]
[ -pn=<partner 1..200> ]
[ -fn=<file name 1..512> ]
[ -rc=0..ffff | -rc=@f]
[ -tid=1..2147483647 ]
[ -gid=<global request ID 1..4294967295> ]
[ -adm=<administrator ID 1..32> ]
[ -ri=<routing info 1..200> ]
[ -llf ]
[ -nb=1..99999999 | -nb=@a ]
[ -po=<polling interval 1..600>

[ -pnr=<polling number 1..3600> ] ]

[ -l ][ -csv ]

Description

-h

Displays the command syntax on the screen. Entries after the -h are ignored.

user ID | @a

is used to specify the login name(s) for which log records are to be displayed. As ordinary user, you can only specify your own login name. As the administrator, you can specify any login name.

@a for user ID

This also displays information, but only on the log records that refer to your own login name.

FT or FTAC or ADM administrators can display the log records for all login names.

user ID not specified

Only the log records for the login name under which the command was entered are displayed.

-lf=file name | -tlf=yyyymmdd[hh[mm[ss]]]

Selects the log file(s) whose log records or name are to be used. This means that you can also view offline log records.

-lf=file name

The log file is selected based on its file name. You must specify the full relative or absolute path name. If no log file exists with the specified file name then an error message is output.

-tlf=yyyymmdd[hh[mm[ss]]]

The log file is selected based on its creation time (local time!). The log file created at or before the specified time is selected. If more than one log file corresponds to the specified time then the next oldest log file is selected.

You must at least specify the date as an 8-digit value indicating the year month and day. The year must be greater than or equal to 2000.

You can specify the time (hhmmss) partially or not at all if you wish. "00" is added to replace any missing specifications. See also Examples.

Neither -lf nor -tlf specified

The current log file is used.

-plf=number

Specifies the number of preceding log files (0 to 3) that are to be selected in addition to the current file or the file specified with -lf or -tlf.

-plf not specified

Selects only the current log file or the log file specified with -lf or -tlf.

If you omit the options -plf and -lf or -tlf then this corresponds to the behavior up to openFT V11.0.

-rg=[[[[yyyy]mm]dd]hhmm]-[[[[yyyy]mm]dd]hhmm]

With -rg you can specify the start and/or end of a logging interval.

[[[yyyy]mm]dd]hhmm

A 4-digit specification is interpreted as the time expressed in hours and minutes, a 6-digit specification as the day (date) and time in hours and minutes, an 8-digit specification as the month, day, and time in hours and minutes, and a 12-digit specification as the year, month, day, and time in hours and minutes. The largest possible value that can be specified as the date is 20380119 (January 19, 2038).

openFT then displays all the log records written during the specified time period. The older time is taken to be the start time and the earlier time as the end time.

If optional data ([[[yyyy]mm]dd]) is omitted, then it is automatically replaced by current values.

If you omit the limit after the dash, the current time is taken. If you omit the limit before the dash, the time of the first log record written is taken.

-rg=-

Displays everything (same meaning as -nb=@a)

-rg=[[[yyyy]mm]dd]hhmm

If the minus sign is missing, the range is the exact minute specified. The largest possible value that can be specified as the date is 20380119 (January 19, 2038). If optional data ([[[yyyy]mm]dd]) is omitted, then it is automatically replaced by current values.

-rg=[#1..999999999999]-[#1..999999999999]

-rg is used to specify the start and/or end of a range of log IDs.

#1..999999999999

The selection of a log ID is indicated by the leading # character. openFT then displays all the log records which lie within the specified range.

If the log ID limit before the dash is omitted, the current ID is taken, and if the log ID limit after the dash is omitted, the ID of the first log record written is taken.

-rg=#1..999999999999

If the minus sign is omitted, the range is restricted to the specified log ID only.

-rg=[0..999][-[0..999]]

Here you specify with -rg a relative time period as a multiple of 24 hours (i.e. as a number of days). Note that the relative time period is calculated with an accuracy of one second from the current time. You have the following options (d1 and d2 1 through 3 digits):

  • -rg=d1-d2 outputs all log records that are between d1 and d2 days old, irrespective of whether d1 is larger or smaller than d2.

  • -rg=d1- outputs all log records that are no more than d1 days old.

  • -rg=-d2 outputs all log records that are at least d2 days old.

-rg=[:0..999][-[:0..999]]

Here you specify with -rg a relative time period in minutes. You have the following options in this case (m1 and m2 1 through 3 digits):

  • -rg=m1-:m2 outputs all log records that are between m1 and m2 minutes old, irrespective of whether m1 is larger or smaller than m2.

  • -rg=:m1 (or -rg=:m1-) outputs all log records that are no more than m1 minutes old.

  • -rg=-:m2 outputs all log records that are at least m2 minutes old.

-rg not specified

The range is not a selection criterion.

-rt=[t][c][a]

Defines which type of log record is to be displayed.

You may specify t, c, a and any combination of these values:

t

The FT log records are displayed.

c

The FTAC log records are displayed.

a

The ADM log records are displayed. For further details, refer to the manual "openFT (Unix and Windows systems) - Installation and Operation".

-rt not specified

The record type is not a selection criterion.

-ff=[t][T][m][r][d][a][C][D][M][l][f]

Defines the FT function for which log records are to be output. Possible values are: t, T, m, r, d, a, C, D, M. l, f or any combination of these values.

The entries m, r, d, a, C, D, M and l are only reasonable for FTAC log records. The entry f is only reasonable for ADM log records. t and T are reasonable for all log records.

t

All log records for the function "transfer files" are output.

T

All log records for the function "transfer directories" are output.

m

All log records for the function "modify file attributes" are output.

r

All log records for the function "read directories" are output.

d

All log records for the function "delete files" are output.

a

All log records for the function "read file attributes" are output.

C

All log records for the function "Create directory" are output.

D

All log records for the function "Delete directory" are output.

M

All log records for the function "Modify directory" are output.

l

All log records for the function "inbound FTP access" are output. These log records are written if incorrect admission data (FTAC transfer admission or user ID/password) was specified for inbound FTP access.

f

All ADM log records of the "Routing" function are output on the remote administration server. Output can be further restricted with the -adm and -ri options. This specification is only of significance to the administrator of the remote administration server.

-ff not specified

The FT function is not a selection criterion.

-ini=l | -ini=r | -ini=lr | -ini=rl

Defines the initiator for which log records are to be output. Possible values are: l, r, lr, rl.

l (local)

Only log records belonging to openFT requests issued locally are output.

r (remote)

Only log records belonging to openFT requests issued remotely are output.

lr, rl

The log records belonging to openFT requests issued locally and remotely are output.

-ini not specified

The initiator is not a selection criterion.

-pn=partner

Defines the partner system to which the log records are to be output. Partner is the name of the partner in the partner list or the address of the partner system. For details on address specifications, see section “Specifying partner addresses”.

For the partner name, you can also use the wildcard symbols '*' (asterisk) and '?' (question mark). * stands for any string and ? stands for any single character.

-pn not specified

The partner system is not a selection criterion.

-fn=file name

Defines the file to which the log records are to be output. You can specify wildcards such as "*" (asterisk, i.e. any character string) and "?" (question mark, i.e. single character).

File names may consist of Unicode characters.

Note on Unix systems

The following table shows the encoding settings for which search via file name and the display of the log records is working correctly:

Input file name

File name in log file

Terminal

System

ISO88591

ISO88591

ISO88591

UTF-8

ISO88591

ISO88591

UTF-8

UTF-8

UTF-8

UTF-8

UTF-8

UTF-8

UTF-8

UTF-8

ISO88591

UTF-8


-fn not specified

The file name is not a selection criterion.

-rc=0..ffff | @f

Defines the reason code as a selection criterion for log record output.

0 .. ffff

All log records with a specified reason code are output.

@f

All log records with reason codes other than 0000 are output. This criterion yields a list of log records for all requests terminated with error messages.

-rc not specified

The reason code is not a selection criterion.

-tid=request ID

-tid specifies the request ID for which you want to output the log records.

-tid not specified

The request ID is not a selection criterion.

-gid=global request ID

With the -gid, you specify the global request ID for which you want to display log records. The global request ID is only relevant for inbound requests from openFT and FTAM partners. It is assigned by the initiator of the request (transfer ID) and is sent to the local system.

-gid= not specified

The global request ID is not used as a selection criterion.

-adm=administrator ID

-adm specifies the administrator ID for which you want to output the ADM log records.

-adm not specified

The administrator ID is not a selection criterion.

-ri=routing info

-ri specifies the routing information for which you want to output the ADM log records.

-ri not specified

The routing info is not a selection criterion.

-llf

outputs the names of log files. -llf is only permitted on its own or in combination with the options -lf, -tlf, -plf, -csv or -h. If any other combination is used then the command is rejected.

-llf without -lf, -plf or -tlf outputs the names of all the log files (current log file together with all the offline log files (up to a maximum of 1024)). To restrict the output, you can also specify -lf, -plf or -tlf, see also Examples.

-llf not specified

Log records that correspond to the current selection criteria are displayed.

-nb=number | @a

Defines the number of log records to be output.

@a for number

All log records are output.

-nb not specified

If -rg is specified simultaneously, -nb is replaced by the value -nb=@a.

If -rg is also not specified, -nb is replaced by the value -nb=1.

-po=polling interval

The polling interval indicates the time between repetitions in seconds. On each repetition, all the new log records are filtered in accordance with the specified selection criteria and the detected records are output.

If you also specify -pnr, you can limit the number of times the data is output. If you specify -po without -pnr, output is repeated an unlimited number of times.

If repeated output has been started with the -po option (with or without -pnr), it can be canceled by an interrupt signal (e.g. Ctrl+C). In addition, the operation is canceled if an error occurs. When the asynchronous server is stopped, output is not interrupted but continues to be issued.

-po must not be specified in combination with -lf, -llf, -plf, -tlf, -tid, -gid, -nb or -rg.

Possible values: 1 through 600.

No log records should be deleted during polling as otherwise discontinuities in the output may appear!


-po not specified

The log records are output immediately and once only.

-pnr=polling number

-pnr specifies the number of repetitions.

-pnr can only be specified in conjunction with -po.

Possible values: 1 through 3600.

-pnr not specified

The output is repeated without restriction.

-l

Defines that the log records are to be output in long form.

-l not specified

The log records are output in short form if -csv has not been specified.

-csv

You can use -csv to specify that the log records are to be output in the CSV format. The values in the output are separated by semicolons.

If -csv is specified, output is always in long form (analogous to -l) regardless of whether or not -l has also been specified.

-csv not specified

The log records are output in the standard format, i.e. in abbreviated form if -l is not specified and in detailed form if -l is specified.

Examples

The following examples each output the log records for the user's own ID. If you are an FT, FTAC or ADM administrator and want to output the log records for all user IDs, you must also specify @a.

  1. All log records that are more than two days (48 hours) old are output:

    ftshwl -rg=-2

  2. All log records that are more than 15 minutes old but less than 30 minutes old are output:

    ftshwl -rg=:15-:30

  3. All log records that are less than 30 minutes old are output:

    ftshwl -rg=:30

  4. All log records that are more than 30 minutes old are output:

    ftshwl -rg=-:30

  5. The last 10 log records where FTAC checks failed (reason code not equal to 0) are output:

    ftshwl -rc=@f -rt=c -nb=10

  6. The name of the current log file and the names of the two preceding offline log files are to be output:

    ftshwl -llf -plf=2

  7. Output of 100 log records from the log file that was created on or before 24.02.2017 00:00:

    ftshwl -tlf=20170224 -nb=100

    Note

    -tlf=20170224 is extended to -tlf=20170224000000. If, for example, there are three log files with the creation dates 20170224 13:30:00, 20170217 10:00:00 and 20170210 08:00:00, then the file with the date 20170217 10:00:00 is taken as the next oldest file.

  8. All records that were created for the filename remote-file. The short output will only show the name of the local file.

    ftshwl -fn=remote-file

    TYP LOG-ID TIME     RC    PARTNER  INITIAT. PROFILE  USER-ADM FILENAME

    2021-03-19

    T    62779 12:45:20 0000 >locBS    root              root     local-file

    To see the remote filename the long output format has to be used:

    # ftshwl -fn=remote-file -l

    LOGGING-ID  = 62779     RC      = 0000        TIME     = 2021-03-19 12:45:20

       TRANS    = TO        REC-TYPE= FT          FUNCTION = TRANSFER-FILE

       PROFILE  =           PCMD    = NONE        STARTTIME= 2021-03-19 12:45:20

       TRANS-ID = 65551     WRITE   = REPLACE     REQUESTED= 2021-03-19 12:45:19

       TRANSFER =        10 kB                    CCS-NAME = ISO88591

       INITIATOR= root

       USER-ADM = root

       PARTNER  = locBS

       FILENAME = local-file

       FNC-MODE = *TRANSPARENT

       REMOTE-FN= remote-file