Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters
For a group of consecutive words like 'end of support' use Match phrase

sp_Feed Topic RSS sp_TopicIcon
extract username used to login to server operating system
04 Mar 2013
7:16 am
Forum Posts: 174
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

is theere any function to extract login user id to server operating system, i tried $user but it returns value USER. server os is unix

04 Mar 2013
7:48 am
Dennis van Duijn
the Netherlands
Forum Posts: 15
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

Have you tried $processinfo(“user”)?

04 Mar 2013
4:11 pm
Forum Posts: 174
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

I get $processinfo output only when exclusive connection is opened as shown below .

(_detail) CONNECT_UROUTER:1 activate “OSUSR”.”GET_OSID”( PID )
(_detail) CONNECT_UROUTER:2 [-155] putmess “output is is %%PID” <——————- before exclusive connection opening
output is is
(_detail) CONNECT_UROUTER:3 [-155] putmess "in connect urouter – %%$$FUNC_ID, %%$$SERVER"
in connect urouter – rsm2app2, SMART2AP
(_detail) CONNECT_UROUTER:4 [-155] open "|%%$$FUNC_ID|%%$PINFO$|%%$$SERVER /ex", "$LOG/NET"
(_detail) CONNECT_UROUTER:5 putmess "status is %%$status"
status is 0
(_detail) CONNECT_UROUTER:6 if ($status < 0)
(_detail) CONNECT_UROUTER:10 endif
(_detail) CONNECT_UROUTER:11 activate "OSUSR"."GET_OSID"( PID ) <—————after exclusive connetion opening
(_detail) CONNECT_UROUTER:12 putmess "output is is %%PID"
output is is rsm2app2

code in osusr services

operation get_osid
string vPID : inout
vPID = $processinfo("user")

05 Mar 2013
9:53 am
Iain Sharp
Forum Posts: 436
Member Since:
01 Oct 2012
sp_UserOfflineSmall Offline

To get your local user, the process needs to run on the local client, so you shouldn’t be routing that service via the urouter.

$processinfo will give you the user logged in with reference to the process which is running, and if that’s on the server then the user will be userver/urouter or whoever runs the service on the server. To get the local (client) user, $processinfo needs to be run on the client.

Forum Timezone: UTC 0

Most Users Ever Online: 77

Currently Online:
7 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

ulrich-merkel: 1404

Iain Sharp: 436

Theo Neeskens: 274

lalitpct: 174

-GHAN-: 171

rogerw: 150

sochaz: 125

istiller: 122

uniface8: 96

Thomas.Young: 82

Member Stats:

Guest Posters: 0

Members: 2374

Moderators: 0

Admins: 8

Forum Stats:

Groups: 1

Forums: 54

Topics: 1422

Posts: 5994

Newest Members: gilles.wenders, MCunnington,, mcolli33, nilofontes,, Boujii, txalaparta, Roger Doyle, Pault

Administrators: admin: 6, Adrian Gosbell: 152, diseli: 346, Bob Maier: 1, Nico Peereboom: 18, Michael Rabone: 2, richiet: 362, JanCees: 13