Compare commits
12 Commits
118072272b
...
a06a7bb76e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a06a7bb76e | ||
|
|
6d603a4cf8 | ||
|
|
443cbcebad | ||
|
|
9f64d55100 | ||
|
|
ea50a315f0 | ||
|
|
adb8d1cf53 | ||
|
|
5715d6d0de | ||
|
|
b9730dffec | ||
|
|
695a60df84 | ||
|
|
6d9c631e3b | ||
|
|
94b96086c6 | ||
|
|
a7522df3c4 |
@ -1,27 +0,0 @@
|
||||
#/bin/bash
|
||||
#Copyright (c) [2019] Huawei Technologies Co., Ltd.
|
||||
#generic-release is licensed under the Mulan PSL v2.
|
||||
#You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||
#You may obtain a copy of Mulan PSL v2 at:
|
||||
# http://license.coscl.org.cn/MulanPSL2
|
||||
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
||||
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
||||
#PURPOSE.
|
||||
#See the Mulan PSL v2 for more details.
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
alias ll='ls -lh'
|
||||
alias la='ls -lAh'
|
||||
alias l.='ls -d .* --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
|
||||
alias zgrep='zgrep --color=auto'
|
||||
alias zfgrep='zfgrep --color=auto'
|
||||
alias zegrep='zegrep --color=auto'
|
||||
|
||||
alias xzgrep='xzgrep --color=auto'
|
||||
alias xzfgrep='xzfgrep --color=auto'
|
||||
alias xzegrep='xzegrep --color=auto'
|
||||
@ -13,6 +13,6 @@
|
||||
# CPUNO=`cat /proc/cpuinfo|grep processor|wc -l`
|
||||
# export GOMP_CPU_AFFINITY=0-$[CPUNO - 1]
|
||||
|
||||
sysctl -w vm.min_free_kbytes=112640 &> /dev/null
|
||||
sysctl -w vm.dirty_ratio=60 &> /dev/null
|
||||
sysctl -w kernel.sched_autogroup_enabled=0 &> /dev/null
|
||||
#sysctl -w vm.min_free_kbytes=112640 &> /dev/null
|
||||
#sysctl -w vm.dirty_ratio=60 &> /dev/null
|
||||
#sysctl -w kernel.sched_autogroup_enabled=0 &> /dev/null
|
||||
|
||||
@ -52,7 +52,7 @@ whoiam=$(whoami)
|
||||
time_cur=$(date)
|
||||
|
||||
# Processes
|
||||
processes=$(ps aux | wc -l)
|
||||
#processes=$(ps aux | wc -l)
|
||||
|
||||
# Users
|
||||
user_num=$(users | wc -w)
|
||||
@ -68,7 +68,7 @@ echo -e "\n"
|
||||
echo -e "Welcome to $welcome\n"
|
||||
echo -e "System information as of time: \t$time_cur\n"
|
||||
echo -e "System load: \t\033[0;33;40m$load_average\033[0m"
|
||||
echo -e "Processes: \t$processes"
|
||||
#echo -e "Processes: \t$processes"
|
||||
echo -e "Memory used: \t$memory_usage"
|
||||
echo -e "Swap used: \t$swap_mem"
|
||||
echo -e "Usage On: \t$usageof"
|
||||
@ -78,7 +78,7 @@ do
|
||||
echo -e "IP address: \t$ip_address"
|
||||
done
|
||||
echo -e "Users online: \t$user_num"
|
||||
if [ "$whoiam" == "root" ]
|
||||
if [ "$whoiam" = "root" ]
|
||||
then
|
||||
echo -e "\n"
|
||||
else
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
%define variant_titlecase Server
|
||||
%define variant_lowercase server
|
||||
%define dist_release_version 8
|
||||
%define generic_version 20.03
|
||||
%define generic_version 24.03
|
||||
%define generic_patch_level LTS
|
||||
%define generic_release 50
|
||||
%define generic_release 55
|
||||
%define builtin_release_version 1.0
|
||||
|
||||
%define current_arch %{_arch}
|
||||
@ -29,20 +29,11 @@ Source3: 99-default-disable.preset
|
||||
|
||||
BuildRequires: python3
|
||||
Requires: %{product_family}-repos bc
|
||||
Obsoletes: yum-utils yum-utils-help yum-utils-plugins
|
||||
Obsoletes: yum-utils yum-utils-help yum-utils-plugins %{product_family}-performance
|
||||
|
||||
%description
|
||||
%{product_family} release files
|
||||
|
||||
%package -n openEuler-performance
|
||||
Requires: coreutils systemd setup
|
||||
|
||||
Summary:performance script
|
||||
%description -n openEuler-performance
|
||||
performance script
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n generic-release-%{builtin_release_version}
|
||||
|
||||
@ -67,9 +58,7 @@ ANSI_COLOR="0;31"
|
||||
EOF
|
||||
|
||||
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/profile.d
|
||||
cp -a color.sh $RPM_BUILD_ROOT/etc/profile.d/
|
||||
cp -a system-info.sh $RPM_BUILD_ROOT/etc/profile.d/
|
||||
cp -a performance.sh $RPM_BUILD_ROOT/etc/profile.d/
|
||||
|
||||
# write cpe to /etc/system/release-cpe
|
||||
echo "cpe:/o:%{product_family}:%{product_family}:%{version}:ga:server" > $RPM_BUILD_ROOT/etc/system-release-cpe
|
||||
@ -113,11 +102,16 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%post
|
||||
rpm -q openEuler-performance > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
cp /etc/profile.d/performance.sh /etc/profile.d/performance.sh.bak
|
||||
echo -e "\033[31m Attention: openEuler-performance package files are backed up to /etc/profile.d/performance.sh.bak \033[0m"
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
/etc/system-release
|
||||
/etc/profile.d/color.sh
|
||||
/etc/profile.d/system-info.sh
|
||||
/etc/%{product_family}-release
|
||||
%config(noreplace) /etc/os-release
|
||||
@ -131,11 +125,22 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/var/lib/supportinfo
|
||||
/usr/share/eula/eula.*
|
||||
|
||||
%files -n openEuler-performance
|
||||
%defattr(0644,root,root,0755)
|
||||
/etc/profile.d/performance.sh
|
||||
|
||||
%changelog
|
||||
* Tue May 28 2024 liyanan <liyanan61@h-partners.com> - 1.0-55
|
||||
- Delete Processes print
|
||||
|
||||
* Tue Mar 19 2024 wangchong <wangchong56@huawei.com> - 1.0-54
|
||||
- modify generic_patch_level
|
||||
|
||||
* Mon Dec 12 2022 wangkai <wangkai385@h-partners.com> - 1.0-53
|
||||
- Delete package openEuler-performance
|
||||
|
||||
* Tue Nov 8 2022 yangmingtai <yangmingtai@huawei.com> - 1.0-52
|
||||
- delete color.sh
|
||||
|
||||
* Tue Nov 8 2022 liyanan <liyanan32@h-partners.com> - 1.0-51
|
||||
- sysconfig parameters have a impact on performance,comment out the relevant content
|
||||
|
||||
* Fri Jul 15 2022 xiasenlin <xiasenlin1@huawei.com> - 1.0.50
|
||||
- Update EULA license for donate
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user