MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / signal_pkg_status

Function signal_pkg_status

core_stats.c:126–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126static inline void signal_pkg_status(unsigned long proc_id)
127{
128 time_t t;
129
130 if (IPC_FD_WRITE(proc_id)<=0)
131 return;
132
133 t = time(NULL);
134 if (t>marker_t[proc_id]+1) {
135
136 if (proc_id==process_no) {
137 /* avoid sending IPC to ourselves, as it will get executed
138 * after we ar done with pkg_status job; better do it inline */
139 rpc_get_pkg_stats(process_no, NULL);
140 } else {
141 if (ipc_send_rpc( proc_id, rpc_get_pkg_stats, NULL)<0) {
142 LM_ERR("failed to trigger pkg stats for process %ld\n",
143 proc_id );
144 return;
145 }
146 }
147
148 marker_t[proc_id] = t;
149 usleep(20);
150 }
151}
152
153static unsigned long get_pkg_total_size( void* proc_id)
154{

Callers 6

get_pkg_total_sizeFunction · 0.85
get_pkg_used_sizeFunction · 0.85
get_pkg_real_used_sizeFunction · 0.85
get_pkg_max_used_sizeFunction · 0.85
get_pkg_free_sizeFunction · 0.85
get_pkg_fragmentsFunction · 0.85

Calls 2

rpc_get_pkg_statsFunction · 0.85
ipc_send_rpcFunction · 0.85

Tested by

no test coverage detected