Subversion Repositories Kolibri OS

Rev

Rev 8633 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1665 Nasarus 1
 
2
{
3
4
 
6825 siemargl 5
char		*buf1k;
1665 Nasarus 6
unsigned	PID;
7
short		STATE;
8
9
 
10
if (NULL == buf1k)
11
	return FALSE;
12
13
 
6825 siemargl 14
15
 
7024 leency 16
17
 
1665 Nasarus 18
	{
19
	n = kol_process_info(i, buf1k);
20
	memcpy(&PID, buf1k+30 ,sizeof(unsigned));
8633 turbocat 21
	STATE = *(buf1k+50);
8634 turbocat 22
	if (9 != STATE)
6825 siemargl 23
		{
24
		if (!sel || 0 == strnicmp(param, buf1k+10, 10))
25
			{
26
			printf ("  %7u %11s %d\n\r", PID, buf1k+10, (*(int*)(buf1k+26)+1)/1024);
8633 turbocat 27
			if (sel)
6825 siemargl 28
				{
29
					LAST_PID = PID;
30
					int cpu_tck = kol_system_cpufreq() / 100;
31
					printf ("  CPU %d%% RAM %d\n\r", *(int*)buf1k / cpu_tck , *(int*)(buf1k+26)+1);
32
				}
33
			}
34
		}
35
	if (i == n)
1665 Nasarus 36
		break;
37
	}
38
39
 
40
return TRUE;
41
42
 
43