Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for sysfs (0.1 sec)

  1. cmd/kube-proxy/app/conntrack.go

    		if mountPoint.Type != sysfsDevice {
    			continue
    		}
    		// Check whether sysfs is 'rw'
    		if len(mountPoint.Opts) > 0 && mountPoint.Opts[0] == permWritable {
    			return true, nil
    		}
    		logger.Error(nil, "Sysfs is not writable", "mountPoint", mountPoint, "mountOptions", mountPoint.Opts)
    		return false, errReadOnlySysFS
    	}
    
    	return false, errors.New("no sysfs mounted")
    }
    
    func readIntStringFile(filename string) (int, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. pkg/kubelet/cadvisor/cadvisor_linux.go

    }
    
    // New creates a new cAdvisor Interface for linux systems.
    func New(imageFsInfoProvider ImageFsInfoProvider, rootPath string, cgroupRoots []string, usingLegacyStats, localStorageCapacityIsolation bool) (Interface, error) {
    	sysFs := sysfs.NewRealSysFs()
    
    	includedMetrics := cadvisormetrics.MetricSet{
    		cadvisormetrics.CpuUsageMetrics:     struct{}{},
    		cadvisormetrics.MemoryUsageMetrics:  struct{}{},
    		cadvisormetrics.CpuLoadMetrics:      struct{}{},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 22:07:20 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  3. pkg/volume/util/volumepathhandler/volume_path_handler_linux.go

    		return fmt.Errorf("losetup -d %s failed: %v", device, err)
    	}
    	return nil
    }
    
    // getLoopDeviceFromSysfs finds the backing file for a loop
    // device from sysfs via "/sys/block/loop*/loop/backing_file".
    func getLoopDeviceFromSysfs(path string) (string, error) {
    	// If the file is a symlink.
    	realPath, err := filepath.EvalSymlinks(path)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 14:49:03 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  4. pkg/volume/util/device_util_linux.go

    //	}
    func (handler *deviceHandler) GetISCSIPortalHostMapForTarget(targetIqn string) (map[string]int, error) {
    	portalHostMap := make(map[string]int)
    	io := handler.getIo
    
    	// Iterate over all the iSCSI hosts in sysfs
    	sysPath := "/sys/class/iscsi_host"
    	hostDirs, err := io.ReadDir(sysPath)
    	if err != nil {
    		if os.IsNotExist(err) {
    			return portalHostMap, nil
    		}
    		return nil, err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 11:12:06 UTC 2022
    - 9.4K bytes
    - Viewed (0)
  5. internal/disk/stat_linux.go

    				if err != nil { // Mostly not found error
    					// Check if there is a parent device:
    					//   e.g. if the mount is based on /dev/nvme0n1p1, let's calculate the
    					//        real device name (nvme0n1) to get its sysfs information
    					parentDevPath, e := os.Readlink("/sys/class/block/" + devName)
    					if e == nil {
    						parentDev := filepath.Base(filepath.Dir(parentDevPath))
    						qst, err = bfs.SysBlockDeviceQueueStats(parentDev)
    					}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 26 19:34:50 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  6. src/net/sock_posix.go

    	// 2) the one from Getpeername, if it succeeds; or
    	// 3) the one passed to us as the raddr parameter.
    	lsa, _ = syscall.Getsockname(fd.pfd.Sysfd)
    	if crsa != nil {
    		fd.setAddr(fd.addrFunc()(lsa), fd.addrFunc()(crsa))
    	} else if rsa, _ = syscall.Getpeername(fd.pfd.Sysfd); rsa != nil {
    		fd.setAddr(fd.addrFunc()(lsa), fd.addrFunc()(rsa))
    	} else {
    		fd.setAddr(fd.addrFunc()(lsa), raddr)
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  7. src/internal/poll/fd_poll_js.go

    		d = 0
    	}
    	if err := fd.incref(); err != nil {
    		return err
    	}
    	switch mode {
    	case 'r':
    		syscall.SetReadDeadline(fd.Sysfd, d)
    	case 'w':
    		syscall.SetWriteDeadline(fd.Sysfd, d)
    	case 'r' + 'w':
    		syscall.SetReadDeadline(fd.Sysfd, d)
    		syscall.SetWriteDeadline(fd.Sysfd, d)
    	}
    	fd.decref()
    	return nil
    }
    
    // IsPollDescriptor reports whether fd is the descriptor being used by the poller.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:12:40 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  8. src/internal/poll/fd_unixjs.go

    	}
    	defer fd.decref()
    	return syscall.Fchdir(fd.Sysfd)
    }
    
    // ReadDirent wraps syscall.ReadDirent.
    // We treat this like an ordinary system call rather than a call
    // that tries to fill the buffer.
    func (fd *FD) ReadDirent(buf []byte) (int, error) {
    	if err := fd.incref(); err != nil {
    		return 0, err
    	}
    	defer fd.decref()
    	for {
    		n, err := ignoringEINTRIO(syscall.ReadDirent, fd.Sysfd, buf)
    		if err != nil {
    			n = 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:12:41 UTC 2023
    - 2K bytes
    - Viewed (0)
  9. src/internal/poll/sockoptip.go

    	}
    	defer fd.decref()
    	return syscall.SetsockoptIPMreq(fd.Sysfd, level, name, mreq)
    }
    
    // SetsockoptIPv6Mreq wraps the setsockopt network call with an IPv6Mreq argument.
    func (fd *FD) SetsockoptIPv6Mreq(level, name int, mreq *syscall.IPv6Mreq) error {
    	if err := fd.incref(); err != nil {
    		return err
    	}
    	defer fd.decref()
    	return syscall.SetsockoptIPv6Mreq(fd.Sysfd, level, name, mreq)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 817 bytes
    - Viewed (0)
  10. src/internal/poll/fd_posix.go

    		return err
    	}
    	defer fd.decref()
    	return syscall.Shutdown(fd.Sysfd, how)
    }
    
    // Fchown wraps syscall.Fchown.
    func (fd *FD) Fchown(uid, gid int) error {
    	if err := fd.incref(); err != nil {
    		return err
    	}
    	defer fd.decref()
    	return ignoringEINTR(func() error {
    		return syscall.Fchown(fd.Sysfd, uid, gid)
    	})
    }
    
    // Ftruncate wraps syscall.Ftruncate.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 07 23:34:17 UTC 2023
    - 1.9K bytes
    - Viewed (0)
Back to top