"general" area within BES structure client dirs' to store small out files

(imported topic written by SystemAdmin)

Relevancy is UNIX OS (ex. AIX/Solaris/Linux).Let’s assume that I develop a task (and related analysis) which will query UNIX client for some data , ex. does user x exists, does filesystem y exists, etc. The action will place results in the output file on a client. I do not want to create any new directory/subdirectory on the client to place my output files (these files will be very small in sizes). I have valid reasons why not I do not want to create a new dirs (unless new dir is suggested within the BES directory structure), nor I do not want to place my output files under /tmp or any other OS based filesystem (even under newly created subdirectory). Instead, I want to place the output files in already existing BES based Directory. What will be the path of such or a good practice to handle described here situations?

(imported comment written by SystemAdmin)

I’ve always just created new directories (with reasonable names) under the client directory, which helps to keep the client directory from becoming too cluttered. It’s also a easy way to find the directories via relevance (i.e., bes client path).

I don’t recall ever having comments from support (Bigfix/IBM) to suggest that this shouldn’t be done.

-Jim

(imported comment written by SystemAdmin)

Hi jwilko

Thank you for the reply.

Let’s assume that,

just for the purpose of my test

, I will put my small output file here {(client folder of current site as string) & "/__Download/ …I do not think that this is good location but I just needed to test. The action worked and uglogfile file was placed there.

My Action script:

delete “{(client folder of current site as string) & “__appendfile”}”

appendfile #!/bin/ksh

appendfile date > “{(client folder of current site as string) & “/__Download/uglogfile”}” 2>&1

wait chmod 555 “{(client folder of current site as string) & “/__appendfile”}”

wait “{(client folder of current site as string) & “/__appendfile”}”

Q. But… I had issue with analysis reading the lines of such file using symbolics path, did not work. How I would I need to change below analysis statement, if all possible to use the same syntax of the path within the analysis code as I have in the action code?

read lines of “{(client folder of current site as string) & “/__Download/uglogfile”}”

(imported comment written by SystemAdmin)

Ok. I wouldn’t normally store my files in an applications own working directories, due to not always knowing how they handle the cleanup process, etc., but I don’t think it’s a major problem if you decided to use an existing subdirectory. I have normally just created my own working directories within the BES client directory.

Regardless, the code for an analysis will be different than an action script, as the functions in the action script tend to do things (function + relevance), and the function won’t be part of the relevance used in the analysis.

Now, as I’m not currently using TEM, I can’t remember where the __Downloads directory is in relation to the client directory, but this relevance should help to point you in the right direction for getting an analysis to pull back lines of a file on a client.

Q: if (exists file “testfile” of parent folder of client ) then (lines of file “testfile” of parent folder of client) else (“testfile does not exist”)

A: testfile does not exist

-Jim

(imported comment written by SystemAdmin)

Thank you for the replies and suggestions.

(imported comment written by SystemAdmin)

Reminder that using ‘parent folder of client’ is probably not a good idea as on some platforms that is a bad place to put files, and in the future on Windows these may be disconnected from the executable directory like they are on other platforms.

In 9.0 you can get the ‘storage folder of client’ which is the parent folder of __BESData (which can be also now gotten to with "data folder of client)

Older clients would have to do ‘parent folder of parent folder of client folder of site “actionsite”’(__BESData can be gotten to by ‘parent folder of client folder of site “actionsite”’ )