New upstream release and Python3 package version.
This commit is contained in:
parent
d4ae3f2546
commit
481a1678c7
11
ps_mem.py
Executable file → Normal file
11
ps_mem.py
Executable file → Normal file
@ -36,7 +36,7 @@
|
|||||||
# Patch from patrice.bouchand.fedora@gmail.com
|
# Patch from patrice.bouchand.fedora@gmail.com
|
||||||
# V1.9 20 Feb 2008 Fix invalid values reported when PSS is available.
|
# V1.9 20 Feb 2008 Fix invalid values reported when PSS is available.
|
||||||
# Reported by Andrey Borzenkov <arvidjaar@mail.ru>
|
# Reported by Andrey Borzenkov <arvidjaar@mail.ru>
|
||||||
# V3.5 29 Sep 2015
|
# V3.6 16 Oct 2015
|
||||||
# http://github.com/pixelb/scripts/commits/master/scripts/ps_mem.py
|
# http://github.com/pixelb/scripts/commits/master/scripts/ps_mem.py
|
||||||
|
|
||||||
# Notes:
|
# Notes:
|
||||||
@ -438,9 +438,8 @@ def print_memory_usage(sorted_cmds, shareds, count, total):
|
|||||||
def verify_environment():
|
def verify_environment():
|
||||||
if os.geteuid() != 0:
|
if os.geteuid() != 0:
|
||||||
sys.stderr.write("Sorry, root permission required.\n")
|
sys.stderr.write("Sorry, root permission required.\n")
|
||||||
if __name__ == '__main__':
|
sys.stderr.close()
|
||||||
sys.stderr.close()
|
sys.exit(1)
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
kv = kernel_ver()
|
kv = kernel_ver()
|
||||||
@ -454,7 +453,7 @@ def verify_environment():
|
|||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def main():
|
||||||
split_args, pids_to_show, watch, only_total = parse_options()
|
split_args, pids_to_show, watch, only_total = parse_options()
|
||||||
verify_environment()
|
verify_environment()
|
||||||
|
|
||||||
@ -490,3 +489,5 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
vm_accuracy = shared_val_accuracy()
|
vm_accuracy = shared_val_accuracy()
|
||||||
show_shared_val_accuracy( vm_accuracy, only_total )
|
show_shared_val_accuracy( vm_accuracy, only_total )
|
||||||
|
|
||||||
|
if __name__ == '__main__': main()
|
||||||
|
16
ps_mem.spec
16
ps_mem.spec
@ -1,20 +1,18 @@
|
|||||||
|
|
||||||
Name: ps_mem
|
Name: ps_mem
|
||||||
Version: 3.5
|
Version: 3.6
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Memory profiling tool
|
Summary: Memory profiling tool
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
License: LGPLv2
|
License: LGPLv2
|
||||||
URL: https://github.com/pixelb/ps_mem
|
URL: https://github.com/pixelb/ps_mem
|
||||||
|
|
||||||
Source0: https://raw.github.com/pixelb/ps_mem/7e295aec/ps_mem.py
|
Source0: https://raw.githubusercontent.com/pixelb/ps_mem/c80287d/ps_mem.py
|
||||||
Source1: http://www.gnu.org/licenses/lgpl-2.1.txt
|
Source1: http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
Source2: ps_mem.1
|
Source2: ps_mem.1
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
Requires: python
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The ps_mem tool reports how much core memory is used per program
|
The ps_mem tool reports how much core memory is used per program
|
||||||
@ -31,8 +29,8 @@ cp -p %{SOURCE0} %{name}
|
|||||||
cp -p %{SOURCE1} LICENSE
|
cp -p %{SOURCE1} LICENSE
|
||||||
cp -p %{SOURCE2} %{name}.1
|
cp -p %{SOURCE2} %{name}.1
|
||||||
|
|
||||||
# use system default python
|
# use python3
|
||||||
sed -i "s|/usr/bin/env python|%{__python}|" %{name}
|
sed -i "s|/usr/bin/env python|%{__python3}|" %{name}
|
||||||
touch -r %{SOURCE0} %{name}
|
touch -r %{SOURCE0} %{name}
|
||||||
|
|
||||||
|
|
||||||
@ -48,6 +46,10 @@ install -Dpm644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 08 2016 Lumir Balhar <lbalhar@redhat.com> - 3.6-1
|
||||||
|
- Latest upstream release
|
||||||
|
- Package ported to Python3 with dependencies
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.5-2
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.5-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user