]> git.pld-linux.org Git - packages/atsar.git/blob - atsar.spec
2b59f676f1399b59beec3b9b71f3022780591bee
[packages/atsar.git] / atsar.spec
1 Summary:        AT Computing System Activity Report is a sar clone for Linux
2 Summary(pl):    Atsar jest odpowiednikiem uniksowego programu sar dla Linuksa
3 Name:           atsar
4 Version:        1.6
5 Release:        1
6 License:        GPL
7 Group:          System Environment/Daemons
8 Source0:        ftp://ftp.atcomputing.nl/pub/tools/linux/%{name}_linux-%{version}.tar.gz
9 # Source0-md5:  2ce51f43f030a609ec12081bb0158b57
10 Source1:        %{name}.init
11 Source2:        %{name}.cron
12 Patch:          %{name}-runfrompath.patch
13 URL:            ftp://ftp.atcomputing.nl/pub/tools/linux/
14 ExclusiveOS:    Linux
15 BuildRoot:      %{tmpdir}/%{name}_linux-%{version}-root-%(id -u -n)
16
17 %description
18 Atsar can be used to measure the load on the most relevant system
19 resources, such as CPU, disk, memory and network. Long-term analysis
20 can be done via cron, by maintaining log files with statistical
21 information. Short-term analysis can be done by starting the command
22 atsar with an interval and a number of samples. The current version of
23 atsar gathers statistics about the utilization of CPU's, disks, memory
24 and swap, serial lines and network (TCP/IP v4 and v6).
25
26 %description -l pl
27 Atsar przydaje siê do pomiarów obci±¿enia najbardziej istotnych
28 zasobów systemowych, takich jak procesor, dysk, pamiêæ i sieæ. Dziêki
29 po³±czeniu z cronem mo¿liwe jest otrzymanie logów z informacj±
30 statystyczn±, przydatnych do d³ugoterminowych analiz. Krótkoterminowe
31 analizy mog± byæ wykonywane przez bezpo¶rednie uruchomienie programu
32 atsar z podaniem parametrów takich jak ilo¶æ próbek i odstêp czasowy
33 miêdzy próbkami. Aktualna wersja programu atsar gromadzi informacje o
34 wykorzystaniu procesora, dysków, pamiêci (operacyjnej i wymiany),
35 ³±czy szeregowych i sieci (TCP/IP v4 i v6).
36
37 %prep
38 %setup -q -n %{name}_linux-%{version}
39 %patch -p1
40
41 %build
42 for r in atsar atsadc \*.o
43   do
44       find -iname $r -exec rm -v {} \;
45   done
46 %{__make}
47
48 %install
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/var/log/atsar} \
51         $RPM_BUILD_ROOT/etc/{rc.d/init.d,cron.d}
52
53 for s in scripts/atsa1 atsar_linux.conf
54   do
55       cat $s | sed -e 's|usr/local/bin|%{_bindir}|g' > sed.$$
56       mv -f sed.$$ $s
57   done
58
59 install atsar/atsar atsadc/atsadc scripts/atsa1 \
60         scripts/atsaftp scripts/atsahttp $RPM_BUILD_ROOT%{_bindir}
61 install man/* $RPM_BUILD_ROOT%{_mandir}/man1
62
63 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/atsar
64 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/atsar
65 install atsar_linux.conf $RPM_BUILD_ROOT%{_sysconfdir}/atsar.conf
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 /usr/bin/atsa1
72 /sbin/chkconfig --add atsar
73 if [ -f /var/lock/subsys/atsar ]; then
74         /etc/rc.d/init.d/atsar restart 1>&2
75 else
76         echo "Type \"/etc/rc.d/init.d/atsar start\" to start atsar" 1>&2
77 fi
78
79 %preun
80 if [ "$1" = "0" ]; then
81         if [ -f /var/lock/subsys/atsar ]; then
82                 /etc/rc.d/init.d/atsar stop
83         fi
84         /sbin/chkconfig --del atsar
85 fi
86
87 %files
88 %defattr(644,root,root,755)
89 %doc README
90 %attr(755,root,root) %{_bindir}/atsar
91 %attr(755,root,root) %{_bindir}/atsadc
92 %attr(755,root,root) %{_bindir}/atsa1
93 %attr(755,root,root) %{_bindir}/atsaftp
94 %attr(755,root,root) %{_bindir}/atsahttp
95 %{_mandir}/man1/atsar.1*
96 %{_mandir}/man1/atsadc.1*
97 %dir /var/log/atsar
98 %attr(754,root,root) %config /etc/rc.d/init.d/atsar
99 %config(noreplace) %verify(not size mtime md5) /etc/cron.d/atsar
100 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/atsar.conf
This page took 0.038019 seconds and 2 git commands to generate.