EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Missing iocsh command?
From: "Mark Rivers" <[email protected]>
To: "Eric Norum" <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Mon, 29 Mar 2010 13:26:39 -0500
Eric,

> Was that to the iocsh or to the vxWorks shell?  The latter would need
quotes around the task name.
> I suspect that you were just lucky to get the task list twice and not
to get an access fault!

No, I did it correctly.  Here's the proof.

ioc13bma> iocsh
epics> thread -5 taskwd

  NAME        ENTRY       TID    PRI   STATUS      PC       SP     ERRNO
DELAY
---------- ------------ -------- --- ---------- -------- --------
------- -----
tExcTask   excTask       1dfd3d0   0 PEND         1c1750  1dfd2e0
30065     0
tLogTask   logTask       1dfaa48   0 PEND         1c1750  1dfa968
0     0
...
CAC-repeate1ba03cc       1342cc0 189 PEND         15f8ec  1342a78
16     0
cpuUsageTas19675a8       150f4d0 255 READY        10e698  150f3f8
0     0

  NAME        ENTRY       TID    PRI   STATUS      PC       SP     ERRNO
DELAY
---------- ------------ -------- --- ---------- -------- --------
------- -----
tExcTask   excTask       1dfd3d0   0 PEND         1c1750  1dfd2e0
30065     0
tLogTask   logTask       1dfaa48   0 PEND         1c1750  1dfa968
0     0
...
CAC-repeate1ba03cc       1342cc0 189 PEND         15f8ec  1342a78
16     0
cpuUsageTas19675a8       150f4d0 255 PEND         15f8ec  150f430
0     0


So it just prints the entire task list twice.

If I spell the task name wrong I get a different output:
epics> thread -5 taskw 
*** argument 2 (taskw) is not a valid thread name ***

Mark

-----Original Message-----
From: Eric Norum [mailto:[email protected]] 
Sent: Monday, March 29, 2010 1:16 PM
To: Mark Rivers
Cc: Andrew Johnson; EPICS tech-talk
Subject: Re: Missing iocsh command?

On Mar 29, 2010, at 10:51 AM, Mark Rivers wrote:

> Hi Eric,
> 
> Thanks for the information.  It seems like renaming "thread" to
> epicsThreadShow would be more consistent.

I agree.
Andrew, can you please make the one-line change to
iocsh/libComRegister.c:

--- ../../iocsh/libComRegister.c	2009-02-24 12:10:57.000000000
-0800
+++ /tmp/blah	2010-03-29 11:09:00.000000000 -0700
@@ -204,7 +204,7 @@
 /* thread (thread information) */
 static const iocshArg threadArg0 = { "[-level] [thread ...]",
iocshArgArgv};
 static const iocshArg * const threadArgs[1] = { &threadArg0 };
-static const iocshFuncDef threadFuncDef = {"thread",1,threadArgs};
+static const iocshFuncDef threadFuncDef =
{"epicsThreadShow",1,threadArgs};
 static void threadCallFunc(const iocshArgBuf *args)
 {
     int i = 1;

and the corresponding change to the app dev guide 'show' command?

> 
> More importantly, the "-level" argument does not seem to provide any
> additional information, at least on Linux or vxWorks.  It would be
very
> helpful if higher levels could print additional information like stack
> usage, etc.

Yep, none of the operating-system specific implementations of
epicsThreadShow appear to do anything with the 'level' argument.

> 
> On vxWorks the following command:
> 
> thread -5 taskwd
> 
> does not restrict its output to the taskwd thread.  In fact it just
> prints out the entire thread list twice.

Was that to the iocsh or to the vxWorks shell?  The latter would need
quotes around the task name.  I suspect that you were just lucky to get
the task list twice and not to get an access fault!


Should the epicsThreadShowAll command just go away?  It's function is
identical to that of epicsThreadShow with no thread-name (or thread-id)
arguments.
-- 
Eric Norum
[email protected]






References:
Missing iocsh command? Mark Rivers
Re: Missing iocsh command? Eric Norum
RE: Missing iocsh command? Mark Rivers
Re: Missing iocsh command? Eric Norum

Navigate by Date:
Prev: Re: Missing iocsh command? Eric Norum
Next: Matsusada R4K Series Wesley Moore
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Missing iocsh command? Eric Norum
Next: Solaris version and edm John William Sinclair
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·