Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/TACC/tacc_stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Evans committed Apr 23, 2021
2 parents 3e43b65 + b8f5356 commit 5e22a83
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 88 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Raw stats files will now be generated in the `archive_dir`.
5. A PostgreSQL database must be setup on the host. To do this, after installation of PostgreSQL
and the `tacc_stats` Python module
```
$ sudo su - postgresql
$ sudo su - postgres
$ psql
# CREATE DATABASE machinename_db;
# CREATE USER taccstats WITH PASSWORD 'taccstats';
Expand Down
Binary file removed monitor/tacc_stats-2.3.4.tar.gz
Binary file not shown.
65 changes: 0 additions & 65 deletions monitor/tacc_stats.spec

This file was deleted.

44 changes: 22 additions & 22 deletions monitor/tacc_statsd.spec
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
Summary: TACC system statistics collector
Summary: Job-level Tracking and Analysis System
Name: tacc_statsd
Version: 2.3.1
Release: 1%{?dist}
Version: 2.3.4
Release: 5%{?dist}
License: GPL
Vendor: Texas Advanced Computing Center
Group: System Environment/Base
Packager: TACC - [email protected]
Source: tacc_stats-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

#%include rpm-dir.inc
%include rpm-dir.inc
%define debug_package %{nil}
%{!?rmqserver: %{error: define rmqserver!} exit 1 }
%{!?system: %{error: define system name!} exit 1}
%{!?server: %{error: define server!} exit 1 }
%{!?queue: %{error: define queue name!} exit 1}

%define _bindir /opt/%{name}
%define _sysconfdir /etc
%define _sysconfdir /etc/systemd/system

%description
This package provides the tacc_stats daemon, along with an /etc/init.d
script to provide control.
This package provides the tacc_statsd daemon, along with a systemv
unit file.

%prep
%setup -n tacc_stats-%{version}

%build
./configure --bindir=%{_bindir} --sysconfdir=%{_sysconfdir} --disable-infiniband --disable-opa CPPFLAGS=-I/admin/build/admin/rpms/stampede2/SOURCES/opa-ff/builtinclude.OPENIB_FF.release LDFLAGS=-L/admin/build/admin/rpms/stampede2/SOURCES/opa-ff/builtlibs.OPENIB_FF.release --enable-rabbitmq
./configure --bindir=%{_bindir} --sysconfdir=%{_sysconfdir} --enable-rabbitmq
make clean
make

%install
rm -rf %{buildroot}
cd src
install -m 0755 -d %{buildroot}/%{_bindir}
install -m 0755 -d %{buildroot}/%{_sysconfdir}
install -m 0755 -d %{buildroot}/%{_sysconfdir}/init.d
install -m 6755 tacc_stats %{buildroot}/%{_bindir}/tacc_stats
install -m 0511 tacc_stats.conf %{buildroot}/%{_sysconfdir}/tacc_stats.conf
install -m 0755 taccstats %{buildroot}/%{_sysconfdir}/init.d/taccstats
install -m 0664 taccstats.service %{buildroot}/%{_sysconfdir}/taccstats.service

%post
chkconfig --add taccstats
sed -i 's/localhost/%{rmqserver}/' %{_sysconfdir}/tacc_stats.conf
sed -i 's/default/%{system}/' %{_sysconfdir}/tacc_stats.conf
/sbin/service taccstats restart
sed -i 's/localhost/%{server}/' %{_sysconfdir}/taccstats.service
sed -i 's/default/%{queue}/' %{_sysconfdir}/taccstats.service
sed -i 's/tacc_statsd/%{name}/' %{_sysconfdir}/taccstats.service

systemctl daemon-reload
systemctl enable taccstats
#systemctl restart taccstats

%preun
if [ $1 == 0 ]; then
/sbin/service taccstats stop || :
chkconfig --del taccstats || :
systemctl stop taccstats
systemctl disable taccstats
fi

%clean
Expand All @@ -57,6 +59,4 @@ rm -rf %{buildroot}
%defattr(-,root,root,-)
%dir %{_bindir}/
%attr(6755,root,root) %{_bindir}/tacc_stats
%attr(0744,root,root) %{_sysconfdir}/tacc_stats.conf
%attr(0744,root,root) %{_sysconfdir}/init.d/taccstats

%attr(0644,root,root) %{_sysconfdir}/taccstats.service

0 comments on commit 5e22a83

Please sign in to comment.