File: pvmtasks

package info (click to toggle)
slpvm 0.1.5-17
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,184 kB
  • sloc: sh: 2,624; ansic: 1,012; makefile: 161
file content (29 lines) | stat: -rwxr-xr-x 526 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env slsh

import ("pvm");
                    
  
define show_tasks (what)
{
   variable s = pvm_tasks (what);
   variable h = pvm_config ();
   variable i;
   
   vmessage ("%21sHOST      TID FLAG COMMAND", " ");

   _for (0, length (s.ti_tid)-1, 1)
     {
	i = ();
	variable host = "??";
	variable j = where (s.ti_host[i] == h.hi_tid);
	if (length (j))
	  host = h.hi_name[j[0]];
	  
	vmessage ("%25s 0x%06X %4d %s",
		  host, s.ti_tid[i],
		  s.ti_flag[i], s.ti_a_out[i]);
     }
}
show_tasks (0);
pvm_exit ();