]>
Commit | Line | Data |
---|---|---|
5655df81 ER |
1 | # TODO |
2 | # - cron errors: | |
3 | #awk: line 36: regular expression compile failed (bad class -- [], [^] or [) | |
4 | #[\[ | |
5 | #awk: line 36: syntax error at or near ] | |
6 | #awk: line 87: regular expression compile failed (bad class -- [], [^] or [) | |
7 | #[\[ | |
8 | #awk: line 87: syntax error at or near ] | |
20fa3aa3 | 9 | Summary: AT Computing System Activity Report - a sar clone for Linux |
c9b8747e | 10 | Summary(pl.UTF-8): Atsar - odpowiednik uniksowego programu sar dla Linuksa |
00f4090c | 11 | Name: atsar |
3c440d55 | 12 | Version: 1.7 |
61a65338 | 13 | Release: 3 |
67d14a5b | 14 | License: GPL |
34c63c24 | 15 | Group: Daemons |
00f4090c | 16 | Source0: ftp://ftp.atcomputing.nl/pub/tools/linux/%{name}_linux-%{version}.tar.gz |
3c440d55 | 17 | # Source0-md5: 2aa73a4a99dd176a02c5336889d8b028 |
00f4090c | 18 | Source1: %{name}.init |
19 | Source2: %{name}.cron | |
f13d9b5c | 20 | Patch0: %{name}-runfrompath.patch |
00f4090c | 21 | URL: ftp://ftp.atcomputing.nl/pub/tools/linux/ |
3c78eebb | 22 | BuildRequires: rpmbuild(macros) >= 1.268 |
e0f35128 | 23 | Requires(post,preun): /sbin/chkconfig |
3c78eebb | 24 | Requires: rc-scripts |
00f4090c | 25 | ExclusiveOS: Linux |
20fa3aa3 | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
00f4090c | 27 | |
28 | %description | |
29 | Atsar can be used to measure the load on the most relevant system | |
30 | resources, such as CPU, disk, memory and network. Long-term analysis | |
31 | can be done via cron, by maintaining log files with statistical | |
32 | information. Short-term analysis can be done by starting the command | |
33 | atsar with an interval and a number of samples. The current version of | |
34 | atsar gathers statistics about the utilization of CPU's, disks, memory | |
35 | and swap, serial lines and network (TCP/IP v4 and v6). | |
36 | ||
4b11da61 JR |
37 | %description -l pl.UTF-8 |
38 | Atsar przydaje się do pomiarów obciążenia najbardziej istotnych | |
39 | zasobów systemowych, takich jak procesor, dysk, pamięć i sieć. Dzięki | |
40 | połączeniu z cronem możliwe jest otrzymanie logów z informacją | |
41 | statystyczną, przydatnych do długoterminowych analiz. Krótkoterminowe | |
42 | analizy mogą być wykonywane przez bezpośrednie uruchomienie programu | |
43 | atsar z podaniem parametrów takich jak ilość próbek i odstęp czasowy | |
44 | między próbkami. Aktualna wersja programu atsar gromadzi informacje o | |
45 | wykorzystaniu procesora, dysków, pamięci (operacyjnej i wymiany), | |
46 | łączy szeregowych i sieci (TCP/IP v4 i v6). | |
00f4090c | 47 | |
48 | %prep | |
49 | %setup -q -n %{name}_linux-%{version} | |
3d6f073a | 50 | %patch0 -p1 |
00f4090c | 51 | |
52 | %build | |
22b2aedb | 53 | for r in atsar atsadc \*.o ;do |
6be42ea8 | 54 | find -iname $r -exec rm -v {} \; |
55 | done | |
00f4090c | 56 | %{__make} |
57 | ||
58 | %install | |
67d14a5b JB |
59 | rm -rf $RPM_BUILD_ROOT |
60 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/var/log/atsar} \ | |
61 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d} | |
62 | ||
22b2aedb | 63 | for s in scripts/atsa1 atsar_linux.conf ;do |
6be42ea8 | 64 | cat $s | sed -e 's|usr/local/bin|%{_bindir}|g' > sed.$$ |
65 | mv -f sed.$$ $s | |
66 | done | |
67d14a5b | 67 | |
4fe9be18 | 68 | install atsar/atsar atsadc/atsadc scripts/atsa1 \ |
67d14a5b JB |
69 | scripts/atsaftp scripts/atsahttp $RPM_BUILD_ROOT%{_bindir} |
70 | install man/* $RPM_BUILD_ROOT%{_mandir}/man1 | |
71 | ||
4fe9be18 | 72 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/atsar |
4fe9be18 | 73 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/atsar |
67d14a5b JB |
74 | install atsar_linux.conf $RPM_BUILD_ROOT%{_sysconfdir}/atsar.conf |
75 | ||
00f4090c | 76 | %clean |
67d14a5b | 77 | rm -rf $RPM_BUILD_ROOT |
00f4090c | 78 | |
79 | %post | |
3c78eebb ER |
80 | %{_bindir}/atsa1 |
81 | %service atsar restart | |
00f4090c | 82 | |
83 | %preun | |
67d14a5b | 84 | if [ "$1" = "0" ]; then |
3c78eebb | 85 | %service atsar stop |
00f4090c | 86 | /sbin/chkconfig --del atsar |
87 | fi | |
88 | ||
00f4090c | 89 | %files |
90 | %defattr(644,root,root,755) | |
7fb259db | 91 | %doc README |
00f4090c | 92 | %attr(755,root,root) %{_bindir}/atsar |
93 | %attr(755,root,root) %{_bindir}/atsadc | |
94 | %attr(755,root,root) %{_bindir}/atsa1 | |
95 | %attr(755,root,root) %{_bindir}/atsaftp | |
96 | %attr(755,root,root) %{_bindir}/atsahttp | |
97 | %{_mandir}/man1/atsar.1* | |
98 | %{_mandir}/man1/atsadc.1* | |
67d14a5b JB |
99 | %dir /var/log/atsar |
100 | %attr(754,root,root) %config /etc/rc.d/init.d/atsar | |
f13d9b5c ER |
101 | %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/atsar |
102 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/atsar.conf |