diff --git a/atune_bpf_collection.spec b/atune_bpf_collection.spec deleted file mode 100644 index 0ce6dcee59195d6fb4001f911e69f2e0b6053cdb..0000000000000000000000000000000000000000 --- 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 afae00c00530b9afe5fc095dbbe31829d9365ce9..5d5cd0804147e61fcfee8508ed762aa4ca8a63fa 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 ]"