chore: prompt

This commit is contained in:
mzz2017 2023-03-13 14:25:14 +08:00
parent 6736979c57
commit 3b8ae5eb18
2 changed files with 4 additions and 2 deletions

View File

@ -169,6 +169,7 @@ loop:
// Ready to close. // Ready to close.
oldC.Close() oldC.Close()
default: default:
log.Infof("Received signal: %v", sig.String())
break loop break loop
} }
} }

View File

@ -103,13 +103,14 @@ func NewControlPlane(
pinPath := filepath.Join(consts.BpfPinRoot, consts.AppName) pinPath := filepath.Join(consts.BpfPinRoot, consts.AppName)
if err = os.MkdirAll(pinPath, 0755); err != nil && !os.IsExist(err) { if err = os.MkdirAll(pinPath, 0755); err != nil && !os.IsExist(err) {
if os.IsNotExist(err) { if os.IsNotExist(err) {
log.Warnln("Perhaps you are in a container environment (lxc). If so, please use higher virtualization (kvm/qemu).") log.Warnln("Perhaps you are in a container environment (such as lxc). If so, please use higher virtualization (kvm/qemu).")
} }
return nil, err return nil, err
} }
/// Load pre-compiled programs and maps into the kernel. /// Load pre-compiled programs and maps into the kernel.
log.Infof("Loading eBPF programs and maps into the kernel. The loading process may take up to 500MB memory, which will be freed after loading. Insufficient memory may cause loading failure.") log.Infof("Loading eBPF programs and maps into the kernel.")
log.Infof("The loading process takes about 512MB free memory, which will be released after loading. Insufficient memory will cause loading failure.")
//var bpf bpfObjects //var bpf bpfObjects
var ProgramOptions = ebpf.ProgramOptions{ var ProgramOptions = ebpf.ProgramOptions{
KernelTypes: nil, KernelTypes: nil,