threads and rrdcached
Steve Clark <[email protected]> Thu, 11 Dec 2014 15:03:45 -0500
| Newsgroups | gmane.comp.db.rrdtool.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============8047964187782045189==
Content-Type: multipart/alternative;
boundary="------------090607030703040800030100"
This is a multi-part message in MIME format.
--------------090607030703040800030100
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Hello List,
I was reading the web page http://oss.oetiker.ch/rrdtool/prog/rrdthreads.en.html
about using threads and it says to use the _r calls like rrd_update_r().
But in examing the code in rrd_update.c for version 1.4.8
it appears calling rrd_update_r() will bypass the use of rrdcached. Am I understanding this
correctly?
Also it looks like rrd_update() eventually calls rrd_update_r() if it doesn't use the
rrdcached daemon.
From rrd_update()
...
if (! rrdc_is_connected(opt_daemon))
{
rc = rrd_update_r(argv[optind], tmplt,
argc - optind - 1, (const char **) (argv + optind + 1));
}
else /* we are connected */
{
rc = rrdc_update (argv[optind], /* file */
argc - optind - 1, /* values_num */
(const char *const *) (argv + optind + 1)); /* values */
if (rc > 0)
rrd_set_error("Failed sending the values to rrdcached: %s",
rrd_strerror (rc));
}
...
Thanks,
--
Stephen Clark
*NetWolves Managed Services, LLC.*
Director of Technology
Phone: 813-579-3200
Fax: 813-882-0209
Email: [email protected]
http://www.netwolves.com
--------------090607030703040800030100
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf=
-8">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
Hello List,<br>
<br>
I was reading the web page <a class=3D"moz-txt-link-freetext"
href=3D"http://oss.oetiker.ch/rrdtool/prog/rrdthreads.en.html">http=
://oss.oetiker.ch/rrdtool/prog/rrdthreads.en.html</a>
<br>
about using threads and it says to use the _r calls like
rrd_update_r(). <br>
<br>
But in examing the code in rrd_update.c for version 1.4.8<br>
it appears calling rrd_update_r() will bypass the use of rrdcached.
Am I understanding this<br>
correctly? <br>
<br>
Also it looks like rrd_update() eventually calls rrd_update_r() if
it doesn't use the <br>
rrdcached daemon.<br>
From rrd_update()<br>
...<br>
<tt>=C2=A0=C2=A0=C2=A0 if (! rrdc_is_connected(opt_daemon))<br>
=C2=A0=C2=A0=C2=A0 {<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rc =3D rrd_update_r(argv[optind], tm=
plt,<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 arg=
c - optind - 1, (const char **) (argv +
optind + 1));<br>
=C2=A0=C2=A0=C2=A0 }<br>
=C2=A0=C2=A0=C2=A0 else /* we are connected */<br>
=C2=A0=C2=A0=C2=A0 {<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rc =3D rrdc_update (argv=
[optind], /* file */<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 argc - optind - 1, /* values_num */<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 (const char *const *) (argv + optind +
1)); /* values */<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (rc > 0)<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
rrd_set_error("Failed sending the values to rrdcached:
%s",<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 rrd_strerror (rc));<br>
=C2=A0=C2=A0=C2=A0 }</tt><br>
...<br>
<br>
Thanks,<br>
<br>
<br>
<div class=3D"moz-signature">-- <br>
Stephen=C2=A0Clark<br>
<b>NetWolves Managed Services, LLC.</b><br>
Director=C2=A0of=C2=A0Technology<br>
Phone:=C2=A0813-579-3200<br>
Fax:=C2=A0813-882-0209<br>
Email:=C2=A0<a class=3D"moz-txt-link-abbreviated"
href=3D"mailto:[email protected]">[email protected]=
om</a><br>
<a class=3D"moz-txt-link-freetext" href=3D"http://www.netwolves.com=
">http://www.netwolves.com</a><br>
</div>
</body>
</html>
--------------090607030703040800030100--
--===============8047964187782045189==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
rrd-developers mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
--===============8047964187782045189==--