⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spylib.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/spyLib.html - generated by refgen from spyLib.c --> <title> spyLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Libraries</i></a></p></blockquote><h1>spyLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>spyLib</strong> - spy CPU activity library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./spyLib.html#spyLibInit">spyLibInit</a></i>(&nbsp;)</b>  -  initialize task cpu utilization tool package<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides a facility to monitor tasks' use of the CPU.The primary interface routine, <b><i><a href="./usrLib.html#spy">spy</a></i>(&nbsp;)</b>, periodically calls <b><i><a href="./usrLib.html#spyReport">spyReport</a></i>(&nbsp;)</b> todisplay the amount of CPU time utilized by each task, the amount of timespent at interrupt level, the amount of time spent in the kernel, and theamount of idle time.  It also displays the total usage since the start of<b><i><a href="./usrLib.html#spy">spy</a></i>(&nbsp;)</b> (or the last call to <b><i><a href="./usrLib.html#spyClkStart">spyClkStart</a></i>(&nbsp;)</b>), and the change in usage sincethe last <b><i><a href="./usrLib.html#spyReport">spyReport</a></i>(&nbsp;)</b>.<p>CPU usage can also be monitored manually by calling <b><i><a href="./usrLib.html#spyClkStart">spyClkStart</a></i>(&nbsp;)</b> and<b><i><a href="./usrLib.html#spyReport">spyReport</a></i>(&nbsp;)</b>, instead of <b><i><a href="./usrLib.html#spy">spy</a></i>(&nbsp;)</b>.  In this case, <b><i><a href="./usrLib.html#spyReport">spyReport</a></i>(&nbsp;)</b> provides a one-timereport of the same information provided by <b><i><a href="./usrLib.html#spy">spy</a></i>(&nbsp;)</b>.<p>Data is gathered by an interrupt-level routine that is connected by<b><i><a href="./usrLib.html#spyClkStart">spyClkStart</a></i>(&nbsp;)</b> to the auxiliary clock.  Currently, this facility cannot beused with CPUs that have no auxiliary clock.  Interrupts that are at ahigher level than the auxiliary clock's interrupt level cannot bemonitored.<p>All user interface routine except <b><i><a href="./spyLib.html#spyLibInit">spyLibInit</a></i>(&nbsp;)</b> are available through usrLib.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>The following call:<pre>    -&gt; spy 10, 200</pre>will generate a report in the following format every 10 seconds,gathering data at the rate of 200 times per second.<pre>NAME          ENTRY       TID   PRI  total % (ticks)  delta % (ticks)--------     --------    -----  ---  ---------------  ---------------tExcTask     _excTask    fbb58    0    0% (       0)    0% (       0)tLogTask     _logTask    fa6e0    0    0% (       0)    0% (       0)tShell       _shell      e28a8    1    0% (       4)    0% (       0)tRlogind     _rlogind    f08dc    2    0% (       0)    0% (       0)tRlogOutTask _rlogOutTa  e93e0    2    2% (     173)    2% (      46)tRlogInTask  _rlogInTas  e7f10    2    0% (       0)    0% (       0)tSpyTask     _spyTask    ffe9c    5    1% (     116)    1% (      28)tNetTask     _netTask    f3e2c   50    0% (       4)    0% (       1)tPortmapd    _portmapd   ef240  100    0% (       0)    0% (       0)KERNEL                                 1% (     105)    0% (      10)INTERRUPT                              0% (       0)    0% (       0)IDLE                                  95% (    7990)   95% (    1998)TOTAL                                 99% (    8337)   98% (    2083)</pre>The "total" column reflects CPU activity since the initial call to <b><i><a href="./usrLib.html#spy">spy</a></i>(&nbsp;)</b>or the last call to <b><i><a href="./usrLib.html#spyClkStart">spyClkStart</a></i>(&nbsp;)</b>.  The "delta" column reflects activitysince the previous report.  A call to <b><i><a href="./usrLib.html#spyReport">spyReport</a></i>(&nbsp;)</b> will produce a singlereport; however, the initial auxiliary clock interrupts and data collectionmust first be started using <b><i><a href="./usrLib.html#spyClkStart">spyClkStart</a></i>(&nbsp;)</b>.<p>Data collection/clock interrupts and periodic reporting are stopped bycalling:<pre>    -&gt; spyStop</pre></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>spyLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./spyLib.html#top">spyLib</a></b>, <b><a href="./usrLib.html#top">usrLib</a></b><hr><a name="spyLibInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>spyLibInit</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>spyLibInit</i>(&nbsp;)</strong> - initialize task cpu utilization tool package</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void spyLibInit (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the task cpu utilization tool package.  If the configuration macro <b>INCLUDE_SPY</b> is defined, it is called by the root task, <b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>(&nbsp;)</b>, in <b>usrConfig.c</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./spyLib.html#top">spyLib</a></b>, <b><a href="./usrLib.html#top">usrLib</a></b></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -