File agent/ninedogs.TODO changed (mode: 100644) (index afc944c..3edf0a8) |
1 |
1 |
[ ] At a trace start, dump the file descriptors, else the trace is useless. |
[ ] At a trace start, dump the file descriptors, else the trace is useless. |
|
2 |
|
Same about queries. |
2 |
3 |
[ ] |
[ ] |
3 |
4 |
|
|
4 |
5 |
Move from: |
Move from: |
|
... |
... |
To add: |
18 |
19 |
in clear at the execution time). |
in clear at the execution time). |
19 |
20 |
[ ] socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 10 |
[ ] socket(AF_INET, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 10 |
20 |
21 |
[ ] Load ninedogs.so with an environemnt variable to replace ninedogs.dlsym.so. |
[ ] Load ninedogs.so with an environemnt variable to replace ninedogs.dlsym.so. |
|
22 |
|
[ ] Some locking is needed accessing fd structure. Probably other places. |
|
23 |
|
Maybe the semaphores blocks concurrent access? |
21 |
24 |
[ ] |
[ ] |
22 |
25 |
|
|
File agent/ninedogs.c changed (mode: 100644) (index 6d0da9b..6deef77) |
... |
... |
void my_trace(const char *func, const char *tf, const char type, ...) |
1464 |
1464 |
memcpy(nd_info->buf + off, &u32, 4); off += 4; |
memcpy(nd_info->buf + off, &u32, 4); off += 4; |
1465 |
1465 |
|
|
1466 |
1466 |
size = export_fd_nodes(nd_info->buf + off, |
size = export_fd_nodes(nd_info->buf + off, |
1467 |
|
sizeof(nd_info->buf) - off, fd_nodes, 32); |
|
|
1467 |
|
sizeof(nd_info->buf) - off, fd_nodes, 32); // TODO: wha is 32/ Isn't is too low? |
1468 |
1468 |
off += size; |
off += size; |
1469 |
1469 |
|
|
1470 |
1470 |
nd_info->buf_size = off; |
nd_info->buf_size = off; |
|
... |
... |
void my_trace(const char *func, const char *tf, const char type, ...) |
1497 |
1497 |
xlog(1, "I do not know how to encode [%s][%c]!\n", func, type); |
xlog(1, "I do not know how to encode [%s][%c]!\n", func, type); |
1498 |
1498 |
break; |
break; |
1499 |
1499 |
} |
} |
1500 |
|
char dump[i * 4 + 1]; |
|
1501 |
|
bin2hex_ascii(dump, out, i); |
|
1502 |
|
xlog(201, " gen: %s\n", dump); |
|
|
1500 |
|
//char dump[i * 4 + 1]; |
|
1501 |
|
//bin2hex_ascii(dump, out, i); |
|
1502 |
|
//xlog(201, " gen: %s\n", dump); |
1503 |
1503 |
|
|
1504 |
1504 |
// TODO: use an internal buffer if we cannot take the lock and move back to 'trywait' |
// TODO: use an internal buffer if we cannot take the lock and move back to 'trywait' |
1505 |
1505 |
xlog(201, " head=%u tail=%u junk=%u to_copy=%u [before lock]\n", |
xlog(201, " head=%u tail=%u junk=%u to_copy=%u [before lock]\n", |
File docs/pre1.txt changed (mode: 100644) (index 62e1a85..6a9022b) |
... |
... |
Ideas for the first presentation |
4 |
4 |
- Why? |
- Why? |
5 |
5 |
- Package management security updates not done. |
- Package management security updates not done. |
6 |
6 |
|
|
|
7 |
|
|
7 |
8 |
- Ce probleme vrei sa le rezolvi? |
- Ce probleme vrei sa le rezolvi? |
8 |
9 |
- Cum te ajuta produsul meu sa-ti rezolvi problemele? |
- Cum te ajuta produsul meu sa-ti rezolvi problemele? |
9 |
10 |
- De ce e mai bun decit alte solutii de pe piata? |
- De ce e mai bun decit alte solutii de pe piata? |
File trace/nd-trace.c changed (mode: 100644) (index 0ff6e40..bc077ee) |
... |
... |
static void nd_trace_color(char *out, const size_t out_size, |
145 |
145 |
const char *flags, const uint64_t u64) |
const char *flags, const uint64_t u64) |
146 |
146 |
{ |
{ |
147 |
147 |
char scolor[4] = { 0 }; |
char scolor[4] = { 0 }; |
|
148 |
|
int r; |
|
149 |
|
|
148 |
150 |
//fprintf(outf, "%s: str=[%s] category=[%s] u64=%lu\n", |
//fprintf(outf, "%s: str=[%s] category=[%s] u64=%lu\n", |
149 |
151 |
// __func__, str, category, u64); fflush(outf); |
// __func__, str, category, u64); fflush(outf); |
150 |
152 |
|
|
|
... |
... |
static void nd_trace_color(char *out, const size_t out_size, |
186 |
188 |
snprintf(scolor, sizeof(scolor), "%u", color); |
snprintf(scolor, sizeof(scolor), "%u", color); |
187 |
189 |
|
|
188 |
190 |
no_theme: |
no_theme: |
189 |
|
int r = snprintf(out, out_size, "%s%s%s%s%s", |
|
|
191 |
|
r = snprintf(out, out_size, "%s%s%s%s%s", |
190 |
192 |
theme_s1, scolor, theme_s2, str, theme_e); |
theme_s1, scolor, theme_s2, str, theme_e); |
191 |
193 |
// we will not color things if we do not have enough space |
// we will not color things if we do not have enough space |
192 |
194 |
if ((unsigned) r > out_size) |
if ((unsigned) r > out_size) |