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