Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 150 for getPids (0.16 sec)

  1. pkg/kubelet/cm/util/cgroups_unsupported.go

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package util
    
    // GetPids gets pids of the desired cgroup
    func GetPids(cgroupPath string) ([]int, error) {
    	return nil, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 732 bytes
    - Viewed (0)
  2. pkg/kubelet/cm/util/cgroups_linux.go

    )
    
    const (
    	// CgroupRoot is the base path where cgroups are mounted
    	CgroupRoot = "/sys/fs/cgroup"
    )
    
    // GetPids gets pids of the desired cgroup
    // Forked from opencontainers/runc/libcontainer/cgroup/fs.Manager.GetPids()
    func GetPids(cgroupPath string) ([]int, error) {
    	dir := ""
    
    	if libcontainercgroups.IsCgroup2UnifiedMode() {
    		path, err := filepath.Rel("/", cgroupPath)
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 12 07:50:19 UTC 2020
    - 2.9K bytes
    - Viewed (0)
  3. pkg/util/procfs/procfs_linux.go

    	if len(name) == 0 {
    		return []int{}, fmt.Errorf("name should not be empty")
    	}
    	re, err := regexp.Compile("(^|/)" + name + "$")
    	if err != nil {
    		return []int{}, err
    	}
    	return getPids(re), nil
    }
    
    func getPids(re *regexp.Regexp) []int {
    	pids := []int{}
    
    	dirFD, err := os.Open("/proc")
    	if err != nil {
    		return nil
    	}
    	defer dirFD.Close()
    
    	for {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 16 09:22:35 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  4. pkg/util/oom/oom_linux.go

    )
    
    func NewOOMAdjuster() *OOMAdjuster {
    	oomAdjuster := &OOMAdjuster{
    		pidLister:        getPids,
    		ApplyOOMScoreAdj: applyOOMScoreAdj,
    	}
    	oomAdjuster.ApplyOOMScoreAdjContainer = oomAdjuster.applyOOMScoreAdjContainer
    	return oomAdjuster
    }
    
    func getPids(cgroupName string) ([]int, error) {
    	return cmutil.GetPids(filepath.Join("/", cgroupName))
    }
    
    // Writes 'value' to /proc/<pid>/oom_score_adj. PID = 0 means self
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 20 07:13:28 UTC 2022
    - 4K bytes
    - Viewed (0)
  5. pkg/util/oom/oom_linux_test.go

    	}
    	applyOOMScoreAdjContainerTester(pidListSequenceLag, 4, []int{1, 2, 4}, false, t)
    }
    
    func TestPidListerFailure(t *testing.T) {
    	_, err := getPids("/does/not/exist")
    	assert.True(t, cgroups.IsNotFound(err) || os.IsNotExist(err), "expected getPids to return not exists error. Got %v", err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  6. pkg/util/procfs/procfs_linux_test.go

    	}
    
    	re, err := regexp.Compile("(^|/)" + filepath.Base(os.Args[0]) + "$")
    	assert.Empty(b, err)
    
    	for i := 0; i < b.N; i++ {
    		pids := getPids(re)
    
    		b.StopTimer()
    		assert.NotZero(b, pids)
    		assert.Contains(b, pids, os.Getpid())
    		b.StartTimer()
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 20 07:13:28 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/container_manager_linux.go

    		cont.ensureStateFunc = func(_ cgroups.Manager) error {
    			return ensureProcessInContainerWithOOMScore(os.Getpid(), int(cm.KubeletOOMScoreAdj), cont.manager)
    		}
    		systemContainers = append(systemContainers, cont)
    	} else {
    		cm.periodicTasks = append(cm.periodicTasks, func() {
    			if err := ensureProcessInContainerWithOOMScore(os.Getpid(), int(cm.KubeletOOMScoreAdj), nil); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:18:16 UTC 2024
    - 35.1K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/suggest/index/SuggestIndexer.java

                    final SearchHit[] hits = response.getHits().getHits();
                    if (hits.length == 0) {
                        break;
                    }
                    for (final SearchHit hit : hits) {
                        final SuggestItem item = SuggestItem.parseSource(hit.getSourceAsMap());
                        item.setDocFreq(0);
                        item.setKinds(Stream.of(item.getKinds()).filter(kind -> kind != SuggestItem.Kind.DOCUMENT)
    Registered: Wed Jun 12 15:38:08 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/suggest/util/SuggestUtil.java

                    while (scrollId != null) {
                        final SearchHit[] hits = response.getHits().getHits();
                        if (hits.length == 0) {
                            break;
                        }
    
                        final BulkRequestBuilder bulkRequestBuiler = client.prepareBulk();
                        Stream.of(hits).map(SearchHit::getId).forEach(id -> bulkRequestBuiler.add(new DeleteRequest(index, id)));
    
    Registered: Wed Jun 12 15:38:08 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  10. fess-crawler-es/src/test/java/org/codelibs/fess/crawler/service/impl/EsUrlQueueServiceTest.java

                    .execute().actionGet().getHits().getTotalHits().value > 0);
    
            urlQueueService.delete("sessionId");
            assertFalse(fesenClient.prepareSearch("fess_crawler.queue").setQuery(QueryBuilders.termQuery("sessionId", "sessionId")).setSize(0)
                    .execute().actionGet().getHits().getTotalHits().value > 0);
    
        }
    
        public void test_insert_update_delete_multiTx() {
    Registered: Wed Jun 12 15:17:51 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 5.1K bytes
    - Viewed (0)
Back to top