1 Summary: AT Computing System Activity Report - a sar clone for Linux
2 Summary(pl): Atsar - odpowiednik uniksowego programu sar dla Linuksa
8 Source0: ftp://ftp.atcomputing.nl/pub/tools/linux/%{name}_linux-%{version}.tar.gz
9 # Source0-md5: 2aa73a4a99dd176a02c5336889d8b028
12 Patch0: %{name}-runfrompath.patch
13 URL: ftp://ftp.atcomputing.nl/pub/tools/linux/
14 BuildRequires: rpmbuild(macros) >= 1.268
15 Requires(post,preun): /sbin/chkconfig
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 Atsar can be used to measure the load on the most relevant system
22 resources, such as CPU, disk, memory and network. Long-term analysis
23 can be done via cron, by maintaining log files with statistical
24 information. Short-term analysis can be done by starting the command
25 atsar with an interval and a number of samples. The current version of
26 atsar gathers statistics about the utilization of CPU's, disks, memory
27 and swap, serial lines and network (TCP/IP v4 and v6).
30 Atsar przydaje siê do pomiarów obci±¿enia najbardziej istotnych
31 zasobów systemowych, takich jak procesor, dysk, pamiêæ i sieæ. Dziêki
32 po³±czeniu z cronem mo¿liwe jest otrzymanie logów z informacj±
33 statystyczn±, przydatnych do d³ugoterminowych analiz. Krótkoterminowe
34 analizy mog± byæ wykonywane przez bezpo¶rednie uruchomienie programu
35 atsar z podaniem parametrów takich jak ilo¶æ próbek i odstêp czasowy
36 miêdzy próbkami. Aktualna wersja programu atsar gromadzi informacje o
37 wykorzystaniu procesora, dysków, pamiêci (operacyjnej i wymiany),
38 ³±czy szeregowych i sieci (TCP/IP v4 i v6).
41 %setup -q -n %{name}_linux-%{version}
45 for r in atsar atsadc \*.o ;do
46 find -iname $r -exec rm -v {} \;
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/var/log/atsar} \
53 $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d}
55 for s in scripts/atsa1 atsar_linux.conf ;do
56 cat $s | sed -e 's|usr/local/bin|%{_bindir}|g' > sed.$$
60 install atsar/atsar atsadc/atsadc scripts/atsa1 \
61 scripts/atsaftp scripts/atsahttp $RPM_BUILD_ROOT%{_bindir}
62 install man/* $RPM_BUILD_ROOT%{_mandir}/man1
64 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/atsar
65 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/atsar
66 install atsar_linux.conf $RPM_BUILD_ROOT%{_sysconfdir}/atsar.conf
69 rm -rf $RPM_BUILD_ROOT
73 %service atsar restart
76 if [ "$1" = "0" ]; then
78 /sbin/chkconfig --del atsar
82 %defattr(644,root,root,755)
84 %attr(755,root,root) %{_bindir}/atsar
85 %attr(755,root,root) %{_bindir}/atsadc
86 %attr(755,root,root) %{_bindir}/atsa1
87 %attr(755,root,root) %{_bindir}/atsaftp
88 %attr(755,root,root) %{_bindir}/atsahttp
89 %{_mandir}/man1/atsar.1*
90 %{_mandir}/man1/atsadc.1*
92 %attr(754,root,root) %config /etc/rc.d/init.d/atsar
93 %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/atsar
94 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/atsar.conf