catalinux / pwatch (public) (License: GPLv3) (since 2016-03-01) (hash sha1)
Set of tools to analyze what a process is doing. 'io' command is used to see who is doing I/O.
List of commits:
Subject Hash Author Date (UTC)
Show also parameters after command. 1e1644c7a23ad0ba9cf7f5e387c94c96e1c46863 Catalin(ux) M. BOIE 2010-11-05 19:46:50
More TODO items added. 59f76d064266361dab046e343f96c821685580fc Catalin(ux) M. BOIE 2010-11-05 19:42:46
Duilder updates. aea4172fc5ea31cddd55c9285b9241162b117760 Catalin(ux) M. BOIE 2010-10-30 22:08:44
Bump up the version to 0.0.5. da39ad57b4b30f50ffe98fcd33b57a2c3391631f Catalin(ux) M. BOIE 2010-10-29 22:40:03
Cosmetic changes. f55a262fa0efcb167a545adaa94c7dd82b2b34a5 Catalin(ux) M. BOIE 2010-10-29 22:38:33
no need for get_sort_by. 8a80cc2fd4cfbba04420d130cea890087290e675 Catalin(ux) M. BOIE 2010-10-29 21:29:29
Show the name of the program in the first line. 6a1cec9f2a9e028d254f8edbdd7dd30a8871f300 Catalin(ux) M. BOIE 2010-10-29 21:20:07
Exclude anon_inotify files. 82d8aba0844c8adb0ab25be667fe30496efbc2fc Catalin(ux) M. BOIE 2010-10-29 21:13:49
Ignore Changelog*. 6292255f489b3e8f71e690bd0c8a0f49e6dbc26e Catalin(ux) M. BOIE 2010-10-29 19:29:33
Do not export git tree and do not push it. 4a18c42a27b68c53039957376f5c92ac65bedec2 Catalin(ux) M. BOIE 2010-10-27 21:09:47
Added duilder's RELEASE_SCRIPT. 3962ddb7984b78d191f5babd0f95700d09c02ca5 Catalin(ux) M. BOIE 2010-10-27 21:08:58
Added .gitignore for src dir. 775ff1c070d95b0ce381a8bcf591f5094d57e764 Catalin(ux) M. BOIE 2010-10-27 20:57:06
Dump to file the speed also. d605c72b495ac7fc3f30d744e5f1eb8778efa3b8 Catalin(ux) M. BOIE 2010-10-27 20:38:46
More TODO entries. df3c39a3c34ce849de7c2436b94a54f24972cbe5 Catalin(ux) M. BOIE 2010-10-27 20:38:12
Cosmetic. c6e4a188d756a080eaa2d0a6e9f8e680b3c95083 Catalin(ux) M. BOIE 2010-10-27 20:36:27
Allow exit using upper 'q'. dd46e260882ca2cb2edb949f1ad2341d4f94cdb8 Catalin(ux) M. BOIE 2009-10-30 23:01:36
TODO in. 06e0185b6e8d363c397fb0ba1e1d5dc40b23b226 Catalin(ux) M. BOIE 2010-10-29 19:35:27
Cosmetic changes. 0b4ca9f5819fd67271f5dfe40a92670f6a00c50b Catalin(ux) M. BOIE 2010-10-29 19:34:37
Displayed the sorted column's header using a different color. ab2fd95c996dc6999ccbdd30ade6c69b0933f42b Cosmin HUMENIUC 2008-07-17 11:36:24
Used the same background color for the entire line 3671a14bc85ca65577612e996efbce52ce71c055 Cosmin HUMENIUC 2008-07-16 08:25:17
Commit 1e1644c7a23ad0ba9cf7f5e387c94c96e1c46863 - Show also parameters after command.
Author: Catalin(ux) M. BOIE
Author date (UTC): 2010-11-05 19:46
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2010-11-05 19:46
Parent(s): 59f76d064266361dab046e343f96c821685580fc
Signer:
Signing key:
Signing status: N
Tree: 9c8ca04a146f6a99ff13fc70ea0179fe295a8af7
File Lines added Lines deleted
src/pwatch.c 20 1
src/pwatch.h 2 0
src/pwatch_proc.c 1 1
src/pwatch_proc.h 1 1
File src/pwatch.c changed (mode: 100644) (index e00a74a..5a98c90)
... ... int pwatch_get_content(const char *file, char *buf, const size_t buf_len)
32 32
33 33 close(fd); close(fd);
34 34
35 return 0;
35 return n;
36 }
37
38 /*
39 * Returns the content of a file but will replace '\0' with ' '
40 * It is useful from /proc/<pid>/cmdline
41 */
42 int pwatch_get_content_text(const char *file, char *buf, const size_t buf_len)
43 {
44 int err, i;
45
46 err = pwatch_get_content(file, buf, buf_len);
47 if (err < 0)
48 return err;
49
50 for (i = 0; i < err - 1; i++)
51 if (buf[i] == '\0')
52 buf[i] = ' ';
53
54 return err;
36 55 } }
37 56
38 57 /* /*
File src/pwatch.h changed (mode: 100644) (index a808b63..5f695eb)
... ... enum {
11 11
12 12 extern int pwatch_get_content(const char *file, char *buf, extern int pwatch_get_content(const char *file, char *buf,
13 13 const size_t buf_len); const size_t buf_len);
14 extern int pwatch_get_content_text(const char *file, char *buf,
15 const size_t buf_len);
14 16
15 17 extern void pwatch_nice_output(char *buf, size_t buf_len, extern void pwatch_nice_output(char *buf, size_t buf_len,
16 18 const unsigned long long speed); const unsigned long long speed);
File src/pwatch_proc.c changed (mode: 100644) (index a4302fa..4de35a4)
... ... int pwatch_proc_load(struct pwatch_proc **head)
319 319
320 320 /* Find out the process name */ /* Find out the process name */
321 321 snprintf(file, sizeof(file), "/proc/%s/cmdline", e->d_name); snprintf(file, sizeof(file), "/proc/%s/cmdline", e->d_name);
322 if (pwatch_get_content(file, proc.name, sizeof(proc.name)) < 0)
322 if (pwatch_get_content_text(file, proc.name, sizeof(proc.name)) < 0)
323 323 continue; continue;
324 324
325 325 if (strlen(proc.name) == 0) { if (strlen(proc.name) == 0) {
File src/pwatch_proc.h changed (mode: 100644) (index 3a78438..5520d46)
... ... struct pwatch_proc {
17 17 struct pwatch_proc *next; struct pwatch_proc *next;
18 18
19 19 pid_t pid; pid_t pid;
20 char name[128];
20 char name[256];
21 21
22 22 unsigned long long speed_read; unsigned long long speed_read;
23 23 unsigned long long speed_write; unsigned long long speed_write;
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/pwatch

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/pwatch

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/pwatch

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main