chore: prompt for memory at startup

This commit is contained in:
mzz2017 2023-03-13 13:29:23 +08:00
parent 1950d37d14
commit 6736979c57

View File

@ -103,13 +103,13 @@ func NewControlPlane(
pinPath := filepath.Join(consts.BpfPinRoot, consts.AppName)
if err = os.MkdirAll(pinPath, 0755); err != nil && !os.IsExist(err) {
if os.IsNotExist(err) {
log.Warnln("Perhaps you are in a container environment (docker/lxc). If so, please use higher virtualization (kvm/qemu). Or you could just try to mount /sys and give privilege and try again.")
log.Warnln("Perhaps you are in a container environment (lxc). If so, please use higher virtualization (kvm/qemu).")
}
return nil, err
}
/// Load pre-compiled programs and maps into the kernel.
log.Infof("Loading eBPF 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.")
//var bpf bpfObjects
var ProgramOptions = ebpf.ProgramOptions{
KernelTypes: nil,