From 6b8c86e0caf821c7b58d168a0161a6aab000c8f2 Mon Sep 17 00:00:00 2001 From: Lv Ying Date: Tue, 2 Aug 2022 19:18:17 +0800 Subject: [PATCH] remove spec file and change start_readahead_tune's directory Signed-off-by: Lv Ying --- atune_bpf_collection.spec | 45 --------------------------------------- start_readahead_tune | 3 +++ 2 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 atune_bpf_collection.spec diff --git a/atune_bpf_collection.spec b/atune_bpf_collection.spec deleted file mode 100644 index 0ce6dce..0000000 --- a/atune_bpf_collection.spec +++ /dev/null @@ -1,45 +0,0 @@ -Name: A-Tune-BPF-Collection -Version: 0.1 -Release: 1 -License: Mulan PSL v2 -Summary: BPF program collection to adjust fine-grained kernel mode to get better performance -URL: https://gitee.com/openeuler/A-Tune-BPF-Collection -Source0: https://gitee.com/openeuler/A-Tune-BPF-Collection/repository/archive/v%{version}.tar.gz - -BuildRequires: clang, llvm, libbpf-devel, bpftool, dwarves -Requires: libbpf -Provides: readahead_tune - -%define debug_package %{nil} - -%description -A-Tune BPF Collection contains a set of BPF program which can interact with kernel in real time. -It has the following capabilities: -readahead_tune: trace file reading characteristics, then ajust file read mode to get maximum I/O efficency - -%prep -%autosetup -n %{name}-%{version} -p1 - -%build -make %{?_smp_mflags} - -%install -install -D -p -m 0755 readahead_tune %{buildroot}/%{_sbindir}/readahead_tune -install -D -p -m 0644 readahead_tune.bpf.o %{buildroot}/%{_sbindir}/readahead_tune.bpf.o -install -D -p -m 0755 start_readahead_tune %{buildroot}/%{_sbindir}/start_readahead_tune -install -D -p -m 0755 stop_readahead_tune %{buildroot}/%{_sbindir}/stop_readahead_tune -install -D -p -m 0644 readahead_tune.conf %{buildroot}%{_sysconfdir}/sysconfig/readahead_tune.conf - -%files -%{_sbindir}/readahead_tune -%{_sbindir}/readahead_tune.bpf.o -%{_sbindir}/start_readahead_tune -%{_sbindir}/stop_readahead_tune -%config(noreplace) %{_sysconfdir}/sysconfig/readahead_tune.conf - -%changelog -* Tue Nov 9 2021 lvying - 0.1-1 -- Type:feature -- ID:NA -- SUG:NA -- DESC: Init A-Tune-BPF-Collection repo and add readahead_tune service diff --git a/start_readahead_tune b/start_readahead_tune index afae00c..5d5cd08 100755 --- a/start_readahead_tune +++ b/start_readahead_tune @@ -1,5 +1,8 @@ #!/bin/bash +# change working directory to current binary position +cd "$(dirname "$0")" + function usage() { echo "Usage: $0 [ -h | --help] [ -c | --config CONFIG_FILE ]" -- Gitee