免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: abel
打印 上一主题 下一主题

[教學]中的教學(二) RRDTOOL 1.2 更新項目 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2005-11-10 19:26 |只看该作者
写得挺好的,不过功能上个人认为比起SolarWinds Orion Network Performance Monitor SLX Edition还是有差距

论坛徽章:
0
12 [报告]
发表于 2005-11-17 17:21 |只看该作者
原帖由 abel 于 2005-5-27 19:14 发表
RRDTOOL 1.2.x 的差異

1.說明
自從上次的 rrdtool 教學後,頗受好評,不過實至今日, rrdtool 巳從 1.0.x 昇級至 1.2.x 版本,這個 1.2.x
版本基本除了 graph 外,並沒有太多太大的變動,而在 graph 上新增 ...


也说一个差别。

rrdtool1.2与1.0有一个不同的小地方,rrdtool1.2对“:”敏感。如果在graph的命令里面包含了非正常位置的”:"就会报错。

如:


  1. /usr/local/rrdtool/bin/rrdtool graph -
  2. --imgformat=PNG
  3. --start=1132130276
  4. --end=1132216676
  5. --title="ANNEX-SW6509-MDF-SW1 - 1/1 - Fiber to Old MDF (OHS-SW5509-MDF)"
  6. --rigid
  7. --base=1000
  8. --height=120
  9. --width=575
  10. --alt-autoscale-max
  11. --lower-limit=0
  12. COMMENT:"From 2005/11/16 03:37:56 To 2005/11/17 03:37:56\c"
  13. COMMENT:"  n"
  14. --vertical-label="bytes per second"
  15. (后面略)
  16.   
复制代码


需要使用跳脱字符""将


COMMENT:"From 2005/11/16 03:37:56 To 2005/11/17 03:37:56\c"
改为
COMMENT:"From 2005/11/16 03\:37\:56 To 2005/11/17 03\:37\:56\c"

[ 本帖最后由 joecen 于 2005-11-17 22:45 编辑 ]

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
13 [报告]
发表于 2005-11-17 18:34 |只看该作者
原帖由 joecen 于 2005-11-17 17:21 发表
COMMENT:"From 2005/11/16 03:37:56 To 2005/11/17 03:37:56c"
改为
COMMENT:"From 2005/11/16 03:37:56 To 2005/11/17 03:37:56c"

???

论坛徽章:
0
14 [报告]
发表于 2005-11-17 22:45 |只看该作者
原帖由 abel 于 2005-11-17 18:34 发表

???


今天可能糊涂了,没有改好就发贴了,现在已经改好。

论坛徽章:
0
15 [报告]
发表于 2005-12-04 12:31 |只看该作者

求14all.cgi文件!!!!

我从网站上下载的14all.cgi文件不能打开,哪个好心人请发到我的邮箱中.谢谢了.yin_jie@126.com

论坛徽章:
0
16 [报告]
发表于 2006-03-31 11:28 |只看该作者
abel大大的中文化patch,虽然不能直接应用在高版本上,但是可以手动修改源码,我已经在1.2.12上试验成功,多谢abel大大了

论坛徽章:
0
17 [报告]
发表于 2006-04-23 12:06 |只看该作者

rrdtool 1.2.12版的中文补丁

本补丁参考abel的rrdtool 1.2.8版本制作,已测试,证明可用.

[root@www src]# diff -u rrd_gfx.c.bak rrd_gfx.c
--- rrd_gfx.c.bak       2005-12-19 04:30:45.000000000 +0800
+++ rrd_gfx.c   2006-04-23 11:05:47.000000000 +0800
@@ -384,6 +384,7 @@
   int          n;
   int           error;
   int        gottab = 0;
+  wchar_t* w_text;

#ifdef HAVE_MBSTOWCS
   wchar_t      *cstr;
@@ -414,6 +415,8 @@
   string->transform.xy = (FT_Fixed)(-sin(M_PI*(rotation)/180.0)*0x10000);
   string->transform.yx = (FT_Fixed)( sin(M_PI*(rotation)/180.0)*0x10000);
   string->transform.yy = (FT_Fixed)( cos(M_PI*(rotation)/180.0)*0x10000);
+  w_text = (wchar_t) calloc (string->count,sizeof(wchar_t));
+  mbstowcs(w_text,text,string->count);

   use_kerning = FT_HAS_KERNING(face);
   previous    = 0;
@@ -443,7 +446,7 @@
     glyph->pos.x = 0;
     glyph->pos.y = 0;
     glyph->image = NULL;
-    glyph->index = FT_Get_Char_Index( face, letter );
+    glyph->index = FT_Get_Char_Index( face, w_text[n]);

     /* compute glyph origin */
     if ( use_kerning && previous && glyph->index ) {
@@ -516,6 +519,7 @@
       string->width = string->bbox.xMax - string->bbox.xMin;
   } */
   string->height = string->bbox.yMax - string->bbox.yMin;
+  free(w_text);
   return string;
}

[root@www src]# diff -u rrd_graph.c.bak rrd_graph.c
--- rrd_graph.c.bak     2005-12-19 04:30:45.000000000 +0800
+++ rrd_graph.c 2006-04-23 11:05:53.000000000 +0800
@@ -2871,7 +2871,8 @@
     tzset();
#endif
#ifdef HAVE_SETLOCALE
-    setlocale(LC_TIME,"");
+    //setlocale(LC_TIME,"");
+    setlocale(LC_ALL,"zh_CN.GB2312");
#endif
     im->yorigin=0;
     im->xorigin=0;

[ 本帖最后由 zqli 于 2006-4-23 12:12 编辑 ]

论坛徽章:
0
18 [报告]
发表于 2006-05-05 11:02 |只看该作者
cgilib的安装问题,那位能详细述之啊?!
[root@fedora4 cgilib-0.5]# make install
cc -I. -Wall -O2 -g   -c -o cgitest.o cgitest.c
cgitest.c: In function 鈓ain?
cgitest.c:108: warning: implicit declaration of function 鈙trcmp?
cgitest.c:116: error: syntax error before 釲ibrary?
cgitest.c:129: warning: implicit declaration of function 鈙trlen?
cgitest.c:129: warning: incompatible implicit declaration of built-in function 鈙trlen?
make: *** [cgitest.o] Error 1

论坛徽章:
0
19 [报告]
发表于 2006-05-12 14:38 |只看该作者
新版的rrdtool已经集成了cgilib,下载的lib目录里也没有了cgi包了。
所以现在已经无需在编译rrdtool时使用"--disable-rrdcgi" 参数了。

论坛徽章:
0
20 [报告]
发表于 2006-09-21 10:04 |只看该作者

谢谢abel

看了abel兄的,对rrdtool有了非常的清楚的认识。做技术的人,如果都能把自己会的一点公开一下,自己在自己的方向在钻进去一点,咳,不说了,好好的研究研究
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP