infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Cloverleaf
list name thread of process in command line
benrpa
I want to retrieve the list of full names of the threads of a process on the command line,
I started with the hciconnstatus command,
I have the list of threads but with the name truncated to 15 characters while some have 20 characters,
this will allow me to do thread statistics with the hcmsiutil -dd command
Do you have an idea
Find more posts tagged with
Clovertech
Comments
Tim Pancost
I suppose it depends on what version you're on. I don't know when it was originally introduced, but on version 20.1, it's just the -i argument on the hciconnstatus command. That will give you column widths to hold the maximum process/thread names in that site.
If you're on a version before this was added, it depends on how deep you want to go down the rabbit hole. For simplicity's sake, we just took the the hciconnstatus command(it's just a Tcl script), copied it from $HCIROOT/bin to $HCIROOT/usercmds(e.g. hciconnstat), and then modified the format statement that sets the column widths for the output:
Before:
set fmt "%-15.15s %-15.15s %-10.10s %-15.15s %-20.20s" ;# Output line format
echo [format $fmt Process Connection State "Proto Status" When]
echo "--------------- --------------- ---------- --------------- --------------------"
After:
set fmt "%-20.20s %-20.20s %-10.10s %-15.15s %-20.20s" ;# Output line format
echo [format $fmt Process Connection State "Proto Status" When]
echo "-------------------- -------------------- ---------- --------------- --------------------"
Then, when you're at command line, you just use hciconnstat(or whatever you called it) instead of hciconnstatus.
HTH,
TIM
Keith McLeod
For hciconnstatus to list the full name I would suggest back up the command file and update the following lines:
set fmt "%-15.15s %-28.28s %-10.10s %-15.15s %-20.20s" ;# Output line format
and you may want to adjust number of - characters in
echo "--------------- ---------------------------- ---------- --------------- --------------------"
I would think of changing the the repeating characters to
echo "[string repeat \- 15] [string repeat \- 28] [string repeat \- 10] [string repeat \- 15] [string repeat \- 20]"
Or if in tcl, use 'netconfig get process connections adt', for example. Here is more info on that tcl command.
example: netconfig get process connections adt
epic_adt2_out epic_adt3_out epic_adtv3_out epic_adt_in epic_adt1_out epic_adt4_out
usage: netconfig action args
action args:
----------------------------------
get connection count
get connection data <connection>
get connection list
get group connections <group>
get group count
get group list
get process connections <process>
get process count
get process data <process>
get process list
get destination data <dest>
get destination list
get version
ingroup <group> <connection>
inprocess <process> <connection>
load ?file?
modified
benrpa
that's perfect, method 1 works great, thank you very much
Keith McLeod
Got mired in the code. Never thought of using that. It is in 19.x.x.x.
Usage:
hciconnstatus [{-p process | -c connection}] [-s {P|T}] [-i] [-h]
Where:
default output is a summary of all processes and connections
-p process = list all connections in <process>
-c connection = list status of <connection>
-s sort = P - sort by process, T - sort by Thread
default - Sort by Process then by Thread
-i = list intact process name and connection name without
truncation
-h = This usage screen