Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 124 lines (93 sloc) 3.28 kb
e76f7cd @dagwieers Updates
dagwieers authored
1 # $Id$
2 # Authority: dag
3 # Upstream: Nigel Griffiths <nag$uk,ibm,com>
4
9003afa @dagwieers Update nmon to 14f. (Simon Matter)
dagwieers authored
5 %define ccopts %nil
6
7 ### RHEL4 kernel has backported features from >= 2.6.18
8 %{?el4:%define ccopts -DKERNEL_2_6_18}
9
e76f7cd @dagwieers Updates
dagwieers authored
10 Summary: Performance analysis tool
11 Name: nmon
b6b58c3 @dagwieers Another batch of updates and new packages.
dagwieers authored
12 Version: 14g
cf42a5f @dagwieers Added %{?dist} tag to all SPEC files (finally)
dagwieers authored
13 Release: 1%{?dist}
9003afa @dagwieers Update nmon to 14f. (Simon Matter)
dagwieers authored
14 License: GPLv3
e76f7cd @dagwieers Updates
dagwieers authored
15 Group: Applications/System
9003afa @dagwieers Update nmon to 14f. (Simon Matter)
dagwieers authored
16 URL: http://nmon.sourceforge.net/
e76f7cd @dagwieers Updates
dagwieers authored
17
9003afa @dagwieers Update nmon to 14f. (Simon Matter)
dagwieers authored
18 Source0: http://dl.sf.net/sourceforge/nmon/lmon%{version}.c
19 Source1: http://dl.sf.net/sourceforge/nmon/makefile
20 Source2: http://dl.sf.net/sourceforge/nmon/Documentation.txt
e76f7cd @dagwieers Updates
dagwieers authored
21 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
22
9003afa @dagwieers Update nmon to 14f. (Simon Matter)
dagwieers authored
23 ExclusiveArch: %{ix86} x86_64 ppc ppc64
24 BuildRequires: ncurses-devel
25 BuildRequires: /usr/include/linux/version.h
e76f7cd @dagwieers Updates
dagwieers authored
26
27 %description
28 nmon is designed for performance specialists to use for monitoring and
29 analyzing performance data.
30
31 %prep
9003afa @dagwieers Update nmon to 14f. (Simon Matter)
dagwieers authored
32 %setup -c -T
33 %{__install} -p -m0644 %{SOURCE0} .
34 %{__install} -p -m0644 %{SOURCE1} .
35 %{__install} -p -m0644 %{SOURCE2} .
e76f7cd @dagwieers Updates
dagwieers authored
36
e93dcfe @dagwieers Updates
dagwieers authored
37 %{__cat} <<EOF >nmon-script.sysconfig
38 ### The directory to store the nmon data files
39 NMONDIR="/var/log/nmon"
40
41 ### Default options for nmon
42 OPTIONS="-f -t"
43
44 ### Number of days to keep nmon data files
45 KEEPDAYS="31"
46 EOF
47
48 %{__cat} <<'EOF' >nmon-script.sh
49 #!/bin/bash
50
51 ### Please make modifications to the options and path in /etc/sysconfig/nmon-script
52
53 ### Default variables
54 SYSCONFIG="/etc/sysconfig/nmon-script"
55 NMONDIR="/var/log/nmon"
56 OPTIONS="-f -t"
57 KEEPDAYS="31"
58
59 ### Read configuration
60 [ -r "$SYSCONFIG" ] && source "$SYSCONFIG"
61
62 ### Kill the old process(es)
63 /usr/bin/pkill -x -f "/usr/bin/nmon $OPTIONS -m $NMONDIR"
64
65 ### Remove old log files
ccdf511 @dagwieers Updated to 12d.
dagwieers authored
66 /usr/bin/find $NMONDIR -ctime +$KEEPDAYS -daystart -type f | xargs rm -f
67
68 ### Start the new process
69 exec /usr/bin/nmon $OPTIONS -m $NMONDIR
e93dcfe @dagwieers Updates
dagwieers authored
70 EOF
71
72 %{__cat} <<EOF >nmon-script.cron
73 0 0 * * * nobody /usr/bin/nmon-script
74 EOF
75
e76f7cd @dagwieers Updates
dagwieers authored
76 %build
ccdf511 @dagwieers Updated to 12d.
dagwieers authored
77 %ifarch ppc ppc64
9003afa @dagwieers Update nmon to 14f. (Simon Matter)
dagwieers authored
78 %{__cc} %{optflags} -D GETUSER -D JFS -D LARGEMEM -D POWER %{ccopts} -lncurses lmon%{version}.c -o nmon
ccdf511 @dagwieers Updated to 12d.
dagwieers authored
79 %else
9003afa @dagwieers Update nmon to 14f. (Simon Matter)
dagwieers authored
80 %{__cc} %{optflags} -D GETUSER -D JFS -D LARGEMEM %{ccopts} -lncurses lmon%{version}.c -o nmon
ccdf511 @dagwieers Updated to 12d.
dagwieers authored
81 %endif
e76f7cd @dagwieers Updates
dagwieers authored
82
83 %install
84 %{__rm} -rf %{buildroot}
ccdf511 @dagwieers Updated to 12d.
dagwieers authored
85 %{__install} -Dp -m0755 nmon %{buildroot}%{_bindir}/nmon
e76f7cd @dagwieers Updates
dagwieers authored
86
e93dcfe @dagwieers Updates
dagwieers authored
87 %{__install} -d -m0755 %{buildroot}%{_localstatedir}/log/nmon/
88 %{__install} -Dp -m0755 nmon-script.sh %{buildroot}%{_bindir}/nmon-script
89 %{__install} -Dp -m0644 nmon-script.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/nmon-script
90 %{__install} -Dp -m0644 nmon-script.cron %{buildroot}%{_sysconfdir}/cron.d/nmon-script
91
e76f7cd @dagwieers Updates
dagwieers authored
92 %clean
93 %{__rm} -rf %{buildroot}
94
95 %files
96 %defattr(-, root, root, 0755)
ccdf511 @dagwieers Updated to 12d.
dagwieers authored
97 %doc Documentation.txt
e93dcfe @dagwieers Updates
dagwieers authored
98 %config(noreplace) %{_sysconfdir}/sysconfig/nmon-script
99 %config %{_sysconfdir}/cron.d/nmon-script
e76f7cd @dagwieers Updates
dagwieers authored
100 %{_bindir}/nmon
e93dcfe @dagwieers Updates
dagwieers authored
101 %{_bindir}/nmon-script
102
103 %defattr(-, nobody, nobody, 0755)
104 %{_localstatedir}/log/nmon/
e76f7cd @dagwieers Updates
dagwieers authored
105
106 %changelog
b6b58c3 @dagwieers Another batch of updates and new packages.
dagwieers authored
107 * Mon Oct 17 2011 Dag Wieers <dag@wieers.com> - 14g-1
108 - Updated to release 14g.
109
9003afa @dagwieers Update nmon to 14f. (Simon Matter)
dagwieers authored
110 * Wed Apr 13 2011 Dag Wieers <dag@wieers.com> - 14f-1
111 - Updated to release 14f. (Simon Matter)
112
ccdf511 @dagwieers Updated to 12d.
dagwieers authored
113 * Thu Nov 05 2009 Dag Wieers <dag@wieers.com> - 12d-1
114 - Updated to release 12d.
115
8ff72a0 @dagwieers Updates
dagwieers authored
116 * Sat Aug 18 2007 Dag Wieers <dag@wieers.com> - 11f-1
117 - Updated to release 11f.
118
e93dcfe @dagwieers Updates
dagwieers authored
119 * Tue Feb 06 2007 Dag Wieers <dag@wieers.com> - 11d-2
120 - Added nmon-script cronjob to do data collection.
121
e76f7cd @dagwieers Updates
dagwieers authored
122 * Wed Jan 31 2007 Dag Wieers <dag@wieers.com> - 11d-1
123 - Initial package. (using DAR)
Something went wrong with that request. Please try again.