]> git.pld-linux.org Git - packages/atsar.git/blob - atsar.spec
df93ca57a1c46c72851826af507e3b607cc9c3a9
[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 %{__make}
43
44 %install
45 cat scripts/atsa1 | sed -e 's|usr/local/bin|%{_bindir}|g' > sed.$$
46 mv -f sed.$$ scripts/atsa1
47 cat atsar_linux.conf | sed -e 's|usr/local/bin|%{_bindir}|g' > sed.$$
48 mv -f sed.$$ atsar_linux.conf
49 rm -rf $RPM_BUILD_ROOT
50 install -d $RPM_BUILD_ROOT%{_bindir}/
51 install -m 0755 atsar/atsar atsadc/atsadc scripts/atsa1 \
52 scripts/atsaftp scripts/atsahttp $RPM_BUILD_ROOT%{_bindir}/
53 install -d $RPM_BUILD_ROOT%{_mandir}/man1
54 install -m 0644 man/* $RPM_BUILD_ROOT%{_mandir}/man1/
55 install -m 0755 -d $RPM_BUILD_ROOT/var/log/atsar
56 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
57 install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/atsar
58 install -d $RPM_BUILD_ROOT/etc/cron.d
59 install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/atsar
60 install -m 0644 atsar_linux.conf $RPM_BUILD_ROOT%{_sysconfdir}/atsar.conf
61
62 %clean
63 rm -rf    $RPM_BUILD_ROOT
64
65 %post
66 /usr/bin/atsa1
67 /sbin/chkconfig --add atsar
68 if [ -f /etc/atsar.conf ]; then
69         /etc/rc.d/init.d/atsar restart 1>&2
70 else
71         echo "Type \"/etc/rc.d/init.d/atsar start\" to start atsar" 1>&2
72 fi
73
74 %preun
75 if [ $1 = 0 ]; then
76         /sbin/chkconfig --del atsar
77 fi
78
79 %postun
80 rm -f /var/lock/subsys/atsar 2> /dev/null
81
82 %files
83 %defattr(644,root,root,755)
84 %doc README
85
86 %attr(755,root,root) %{_bindir}/atsar
87 %attr(755,root,root) %{_bindir}/atsadc
88 %attr(755,root,root) %{_bindir}/atsa1
89 %attr(755,root,root) %{_bindir}/atsaftp
90 %attr(755,root,root) %{_bindir}/atsahttp
91 %{_mandir}/man1/atsar.1*
92 %{_mandir}/man1/atsadc.1*
93 %dir /var/log/atsar
94 %attr(755,root,root) %config /etc/rc.d/init.d/atsar
95 %config /etc/cron.d/atsar
96 %config %{_sysconfdir}/atsar.conf
This page took 0.038824 seconds and 2 git commands to generate.