Compare commits
No commits in common. "a06a7bb76e879991ace8cf9533d0ee22ea68d885" and "118072272b7c08ccb6afa68ae242c066366bb016" have entirely different histories.
a06a7bb76e
...
118072272b
27
generic-release-1.0/color.sh
Normal file
27
generic-release-1.0/color.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#/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`
|
# CPUNO=`cat /proc/cpuinfo|grep processor|wc -l`
|
||||||
# export GOMP_CPU_AFFINITY=0-$[CPUNO - 1]
|
# export GOMP_CPU_AFFINITY=0-$[CPUNO - 1]
|
||||||
|
|
||||||
#sysctl -w vm.min_free_kbytes=112640 &> /dev/null
|
sysctl -w vm.min_free_kbytes=112640 &> /dev/null
|
||||||
#sysctl -w vm.dirty_ratio=60 &> /dev/null
|
sysctl -w vm.dirty_ratio=60 &> /dev/null
|
||||||
#sysctl -w kernel.sched_autogroup_enabled=0 &> /dev/null
|
sysctl -w kernel.sched_autogroup_enabled=0 &> /dev/null
|
||||||
|
|||||||
@ -52,7 +52,7 @@ whoiam=$(whoami)
|
|||||||
time_cur=$(date)
|
time_cur=$(date)
|
||||||
|
|
||||||
# Processes
|
# Processes
|
||||||
#processes=$(ps aux | wc -l)
|
processes=$(ps aux | wc -l)
|
||||||
|
|
||||||
# Users
|
# Users
|
||||||
user_num=$(users | wc -w)
|
user_num=$(users | wc -w)
|
||||||
@ -68,7 +68,7 @@ echo -e "\n"
|
|||||||
echo -e "Welcome to $welcome\n"
|
echo -e "Welcome to $welcome\n"
|
||||||
echo -e "System information as of time: \t$time_cur\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 "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 "Memory used: \t$memory_usage"
|
||||||
echo -e "Swap used: \t$swap_mem"
|
echo -e "Swap used: \t$swap_mem"
|
||||||
echo -e "Usage On: \t$usageof"
|
echo -e "Usage On: \t$usageof"
|
||||||
@ -78,7 +78,7 @@ do
|
|||||||
echo -e "IP address: \t$ip_address"
|
echo -e "IP address: \t$ip_address"
|
||||||
done
|
done
|
||||||
echo -e "Users online: \t$user_num"
|
echo -e "Users online: \t$user_num"
|
||||||
if [ "$whoiam" = "root" ]
|
if [ "$whoiam" == "root" ]
|
||||||
then
|
then
|
||||||
echo -e "\n"
|
echo -e "\n"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
%define variant_titlecase Server
|
%define variant_titlecase Server
|
||||||
%define variant_lowercase server
|
%define variant_lowercase server
|
||||||
%define dist_release_version 8
|
%define dist_release_version 8
|
||||||
%define generic_version 24.03
|
%define generic_version 20.03
|
||||||
%define generic_patch_level LTS
|
%define generic_patch_level LTS
|
||||||
%define generic_release 55
|
%define generic_release 50
|
||||||
%define builtin_release_version 1.0
|
%define builtin_release_version 1.0
|
||||||
|
|
||||||
%define current_arch %{_arch}
|
%define current_arch %{_arch}
|
||||||
@ -29,11 +29,20 @@ Source3: 99-default-disable.preset
|
|||||||
|
|
||||||
BuildRequires: python3
|
BuildRequires: python3
|
||||||
Requires: %{product_family}-repos bc
|
Requires: %{product_family}-repos bc
|
||||||
Obsoletes: yum-utils yum-utils-help yum-utils-plugins %{product_family}-performance
|
Obsoletes: yum-utils yum-utils-help yum-utils-plugins
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{product_family} release files
|
%{product_family} release files
|
||||||
|
|
||||||
|
%package -n openEuler-performance
|
||||||
|
Requires: coreutils systemd setup
|
||||||
|
|
||||||
|
Summary:performance script
|
||||||
|
%description -n openEuler-performance
|
||||||
|
performance script
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n generic-release-%{builtin_release_version}
|
%setup -q -n generic-release-%{builtin_release_version}
|
||||||
|
|
||||||
@ -58,7 +67,9 @@ ANSI_COLOR="0;31"
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/profile.d
|
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 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
|
# write cpe to /etc/system/release-cpe
|
||||||
echo "cpe:/o:%{product_family}:%{product_family}:%{version}:ga:server" > $RPM_BUILD_ROOT/etc/system-release-cpe
|
echo "cpe:/o:%{product_family}:%{product_family}:%{version}:ga:server" > $RPM_BUILD_ROOT/etc/system-release-cpe
|
||||||
@ -102,16 +113,11 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/systemd/system-preset/
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
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
|
%files
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
/etc/system-release
|
/etc/system-release
|
||||||
|
/etc/profile.d/color.sh
|
||||||
/etc/profile.d/system-info.sh
|
/etc/profile.d/system-info.sh
|
||||||
/etc/%{product_family}-release
|
/etc/%{product_family}-release
|
||||||
%config(noreplace) /etc/os-release
|
%config(noreplace) /etc/os-release
|
||||||
@ -125,22 +131,11 @@ fi
|
|||||||
/var/lib/supportinfo
|
/var/lib/supportinfo
|
||||||
/usr/share/eula/eula.*
|
/usr/share/eula/eula.*
|
||||||
|
|
||||||
|
%files -n openEuler-performance
|
||||||
|
%defattr(0644,root,root,0755)
|
||||||
|
/etc/profile.d/performance.sh
|
||||||
|
|
||||||
%changelog
|
%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
|
* Fri Jul 15 2022 xiasenlin <xiasenlin1@huawei.com> - 1.0.50
|
||||||
- Update EULA license for donate
|
- Update EULA license for donate
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user