Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
psutil | psutil-master/CONTRIBUTING.md | Contributing to psutil project
==============================
Issues
------
* The issue tracker is for reporting problems or proposing enhancements related
to the **program code**.
* Please do not open issues **asking for support**. Instead, use the forum at:
https://groups.google.com/g/psutil.
* Before submittin... | 1,681 | 45.722222 | 93 | md |
psutil | psutil-master/appveyor.yml | # Build: 3 (bump this up by 1 to force an appveyor run)
os: Visual Studio 2015
# avoid 2 builds when pushing on PRs
skip_branch_with_pr: true
# avoid build on new GIT tag
skip_tags: true
matrix:
# stop build on first failure
fast_finish: true
environment:
global:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd scr... | 2,395 | 27.52381 | 92 | yml |
psutil | psutil-master/setup.py | #!/usr/bin/env python3
# Copyright (c) 2009 Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Cross-platform lib for process and system monitoring in Python."""
from __future__ import print_function
import contextlib
impo... | 16,521 | 32.787321 | 79 | py |
psutil | psutil-master/.github/FUNDING.yml | # These are supported funding model platforms
tidelift: "pypi/psutil"
github: giampaolo
patreon: # Replace with a single Patreon username
open_collective: psutil
ko_fi: # Replace with a single Ko-fi username
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
custom: https://www... | 392 | 38.3 | 91 | yml |
psutil | psutil-master/.github/PULL_REQUEST_TEMPLATE.md | ## Summary
* OS: { type-or-version }
* Bug fix: { yes/no }
* Type: { core, doc, performance, scripts, tests, wheels, new-api }
* Fixes: { comma-separated list of issues fixed by this PR, if any }
## Description
{{{
A clear explanation of your bugfix or enhancement. Please read the contributing guidelines before su... | 396 | 27.357143 | 107 | md |
psutil | psutil-master/.github/no-response.yml | # Configuration for probot-no-response: https://github.com/probot/no-response
# Number of days of inactivity before an issue is closed for lack of response
daysUntilClose: 14
# Label requiring a response
responseRequiredLabel: need-more-info
# Comment to post when closing an Issue for lack of response.
# Set to `false... | 575 | 51.363636 | 225 | yml |
psutil | psutil-master/.github/ISSUE_TEMPLATE/bug.md | ---
name: Bug
about: Report a bug
title: "[OS] title"
labels: 'bug'
---
## Summary
* OS: { type-or-version }
* Architecture: { 64bit, 32bit, ARM, PowerPC, s390 }
* Psutil version: { pip3 show psutil }
* Python version: { python3 -V }
* Type: { core, doc, performance, scripts, tests, wheels, new-api, installation }
#... | 536 | 23.409091 | 126 | md |
psutil | psutil-master/.github/ISSUE_TEMPLATE/config.yml | blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://groups.google.com/g/psutil
about: Use this to ask for support
| 151 | 24.333333 | 43 | yml |
psutil | psutil-master/.github/ISSUE_TEMPLATE/enhancement.md | ---
name: Enhancement
about: Propose an enhancement
labels: 'enhancement'
title: "[OS] title"
---
## Summary
* OS: { type-or-version }
* Type: { core, doc, performance, scripts, tests, wheels, new-api }
## Description
{{{
A clear explanation of your proposal. Please read the contributing guidelines before submit... | 392 | 18.65 | 94 | md |
psutil | psutil-master/.github/workflows/bsd.yml | # Execute tests on *BSD platforms. Does not produce wheels.
# Useful URLs:
# https://github.com/vmactions/freebsd-vm
# https://github.com/vmactions/openbsd-vm
# https://github.com/vmactions/netbsd-vm
on: [push, pull_request]
name: bsd-tests
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.even... | 1,955 | 27.764706 | 180 | yml |
psutil | psutil-master/.github/workflows/build.yml | # Runs CI tests and generates wheels on the following platforms:
#
# * Linux (py2 and py3)
# * macOS (py2 and py3)
# * Windows (py3, py2 is done by appveyor)
#
# Useful URLs:
# * https://github.com/pypa/cibuildwheel
# * https://github.com/actions/checkout
# * https://github.com/actions/setup-python
# * https://github.c... | 3,742 | 25.928058 | 110 | yml |
psutil | psutil-master/.github/workflows/issues.py | #!/usr/bin/env python3
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Bot triggered by Github Actions every time a new issue, PR or comment
is created. Assign labels, provide replies, closes issues... | 9,551 | 26.527378 | 78 | py |
psutil | psutil-master/.github/workflows/issues.yml | # Fired by Github Actions every time an issue, PR or comment is created.
name: issues
on:
issues:
types: [opened]
pull_request:
typed: [opened]
issue_comment:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
# install python
- uses: actions/checkout@v3
- name: Install... | 680 | 20.28125 | 84 | yml |
psutil | psutil-master/docs/conf.py | # -*- coding: utf-8 -*-
#
# psutil documentation build configuration file, created by
# sphinx-quickstart on Wed Oct 19 21:54:30 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | 10,839 | 27.753316 | 79 | py |
psutil | psutil-master/docs/_static/css/custom.css | .wy-nav-content {
max-width: 100% !important;
padding: 15px !important;
}
.rst-content dl:not(.docutils) {
margin: 0px 0px 0px 0px !important;
}
.data dd {
margin-bottom: 0px !important;
}
.data .descname {
border-right:10px !important;
}
.local-toc li ul li {
padding-left: 20px !important;
... | 8,199 | 14.213358 | 213 | css |
psutil | psutil-master/psutil/__init__.py | # -*- coding: utf-8 -*-
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""psutil is a cross-platform library for retrieving information on
running processes and system utilization (CPU, memory, disks, ... | 87,870 | 35.086653 | 79 | py |
psutil | psutil-master/psutil/_common.py | # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Common objects shared by __init__.py and _ps*.py modules."""
# Note: this module is imported by setup.py so it should not import
# psutil or third-part... | 29,186 | 30.149413 | 81 | py |
psutil | psutil-master/psutil/_compat.py | # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Module which provides compatibility with older Python versions.
This is more future-compatible rather than the opposite (prefer latest
Python 3 way of d... | 15,025 | 32.317073 | 78 | py |
psutil | psutil-master/psutil/_psaix.py | # Copyright (c) 2009, Giampaolo Rodola'
# Copyright (c) 2017, Arnon Yaari
# All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""AIX platform implementation."""
import functools
import glob
import os
import re
import subprocess
import sys
from c... | 18,665 | 32.571942 | 78 | py |
psutil | psutil-master/psutil/_psbsd.py | # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""FreeBSD, OpenBSD and NetBSD platforms implementation."""
import contextlib
import errno
import functools
import os
import xml.etree.ElementTree as ET
f... | 31,877 | 33.277419 | 107 | py |
psutil | psutil-master/psutil/_pslinux.py | # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Linux platform implementation."""
from __future__ import division
import base64
import collections
import errno
import functools
import glob
import os... | 86,913 | 37.355693 | 88 | py |
psutil | psutil-master/psutil/_psosx.py | # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""macOS platform implementation."""
import errno
import functools
import os
from collections import namedtuple
from . import _common
from . import _pspo... | 16,169 | 28.833948 | 79 | py |
psutil | psutil-master/psutil/_psposix.py | # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Routines common to all posix systems."""
import glob
import os
import signal
import sys
import time
from ._common import MACOS
from ._common import Ti... | 8,245 | 34.390558 | 79 | py |
psutil | psutil-master/psutil/_pssunos.py | # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Sun OS Solaris platform implementation."""
import errno
import functools
import os
import socket
import subprocess
import sys
from collections import n... | 25,486 | 34.009615 | 79 | py |
psutil | psutil-master/psutil/_psutil_aix.c | /*
* Copyright (c) 2009, Giampaolo Rodola'
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
* AIX support is experimental at this time.
* The following functions and methods are unsupported on th... | 30,210 | 26.046553 | 79 | c |
psutil | psutil-master/psutil/_psutil_bsd.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola', Landry Breuil
* (OpenBSD implementation), Ryo Onodera (NetBSD implementation).
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Platform-specific module methods for FreeBSD and O... | 7,772 | 35.492958 | 105 | c |
psutil | psutil-master/psutil/_psutil_common.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Routines common to all platforms.
*/
#include <Python.h>
#include "_psutil_common.h"
// =====================================================... | 12,644 | 27.608597 | 80 | c |
psutil | psutil-master/psutil/_psutil_common.h | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
// ====================================================================
// --- Global vars / constants
// ==================... | 6,118 | 33.570621 | 77 | h |
psutil | psutil-master/psutil/_psutil_linux.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Linux-specific functions.
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include <Python.h>
#include <errno.h>
#include <stdlib.h>
#... | 15,257 | 25.721541 | 80 | c |
psutil | psutil-master/psutil/_psutil_osx.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* macOS platform-specific module methods.
*/
#include <Python.h>
#include <sys/proc.h>
#include <netinet/tcp_fsm.h>
#include "_psuti... | 4,821 | 32.72028 | 80 | c |
psutil | psutil-master/psutil/_psutil_posix.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Functions specific to all POSIX compliant platforms.
*/
#include <Python.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/resource.h>
#... | 27,849 | 26.065112 | 150 | c |
psutil | psutil-master/psutil/_psutil_posix.h | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
long psutil_getpagesize(void);
int psutil_pid_exists(pid_t pid);
void psutil_raise_for_pid(pid_t pid, char *msg);
| 289 | 28 | 73 | h |
psutil | psutil-master/psutil/_psutil_sunos.c | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Functions specific to Sun OS Solaris platforms.
*
* Thanks to Justin Venus who originally wrote a consistent part of
* this in Cython which I... | 50,462 | 27.542421 | 83 | c |
psutil | psutil-master/psutil/_psutil_windows.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Windows platform-specific module methods for _psutil_windows.
*
* List of undocumented Windows NT APIs which are used in here and i... | 10,563 | 35.937063 | 85 | c |
psutil | psutil-master/psutil/_pswindows.py | # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Windows platform implementation."""
import contextlib
import errno
import functools
import os
import signal
import sys
import time
from collections imp... | 37,424 | 32.38537 | 78 | py |
psutil | psutil-master/psutil/arch/aix/common.c | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/core.h>
#include <stdlib.h>
#include "common.h"
/* psutil_kread() - read from kernel memory */
int
psutil_kread(
... | 2,285 | 27.575 | 78 | c |
psutil | psutil-master/psutil/arch/aix/common.h | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef __PSUTIL_AIX_COMMON_H__
#define __PSUTIL_AIX_COMMON_H__
#include <sys/core.h>
#define PROCINFO_INCR (256)
#define PROCSIZE (sizeof... | 894 | 26.96875 | 73 | h |
psutil | psutil-master/psutil/arch/aix/ifaddrs.c | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*! Based on code from
https://lists.samba.org/archive/samba-technical/2009-February/063079.html
!*/
#include <string.h>
#include <stdlib.h>
#in... | 3,840 | 24.606667 | 77 | c |
psutil | psutil-master/psutil/arch/aix/ifaddrs.h | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*! Based on code from
https://lists.samba.org/archive/samba-technical/2009-February/063079.html
!*/
#ifndef GENERIC_AIX_IFADDRS_H
#define GENE... | 767 | 20.942857 | 77 | h |
psutil | psutil-master/psutil/arch/aix/net_connections.c | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Baded on code from lsof:
* http://www.ibm.com/developerworks/aix/library/au-lsof.html
* - dialects/aix/dproc.c:gather_proc_info
* - lib/prfp.c:... | 8,134 | 27.246528 | 78 | c |
psutil | psutil-master/psutil/arch/aix/net_connections.h | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef __NET_CONNECTIONS_H__
#define __NET_CONNECTIONS_H__
#include <Python.h>
PyObject* psutil_net_connections(PyObject *self, PyObject *args);
... | 356 | 21.3125 | 73 | h |
psutil | psutil-master/psutil/arch/aix/net_kernel_structs.h | /*
* Copyright (c) 2017, Arnon Yaari
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* The kernel is always 64 bit but Python is usually compiled as a 32 bit
* process. We're reading the kernel memory to get the network connections,... | 4,060 | 35.258929 | 77 | h |
psutil | psutil-master/psutil/arch/bsd/cpu.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <sys/resource.h>
#include <sys/sched.h>
PyObject *
psutil_cpu_count_logical(PyO... | 1,552 | 26.732143 | 73 | c |
psutil | psutil-master/psutil/arch/bsd/cpu.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_cpu_count_logical(PyObject *self, PyObject *args);
PyObject *psutil_cpu_times(PyObject *self, Py... | 335 | 29.545455 | 73 | h |
psutil | psutil-master/psutil/arch/bsd/disk.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/mount.h>
#if PSUTIL_NETBSD
// getvfsstat()
#include <sys/types.h>
#include <sys/statvfs.... | 5,271 | 27.652174 | 73 | c |
psutil | psutil-master/psutil/arch/bsd/disk.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_disk_partitions(PyObject *self, PyObject *args);
| 273 | 26.4 | 73 | h |
psutil | psutil-master/psutil/arch/bsd/net.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <string.h>
#include <net/if.h>
#include <net/if_dl.h>
#include <net/route.h>
Py... | 3,121 | 28.45283 | 73 | c |
psutil | psutil-master/psutil/arch/bsd/net.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_net_io_counters(PyObject *self, PyObject *args);
| 273 | 26.4 | 73 | h |
psutil | psutil-master/psutil/arch/bsd/proc.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <kvm.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/types.h>
#include <sys/file.h>
#inclu... | 15,817 | 30.955556 | 107 | c |
psutil | psutil-master/psutil/arch/bsd/proc.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_pids(PyObject *self, PyObject *args);
PyObject *psutil_proc_environ(PyObject *self, PyObject *ar... | 519 | 36.142857 | 73 | h |
psutil | psutil-master/psutil/arch/bsd/sys.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <stdio.h>
#include <sys/param.h> // OS version
#ifdef PSUTIL_FREEBSD
#if __F... | 4,387 | 26.08642 | 89 | c |
psutil | psutil-master/psutil/arch/bsd/sys.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_boot_time(PyObject *self, PyObject *args);
PyObject *psutil_users(PyObject *self, PyObject *args... | 323 | 28.454545 | 73 | h |
psutil | psutil-master/psutil/arch/freebsd/cpu.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
System-wide CPU related functions.
Original code was refactored and moved from psutil/arch/freebsd/specific.c
in 2020 (and was move... | 5,555 | 27.492308 | 79 | c |
psutil | psutil-master/psutil/arch/freebsd/cpu.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_cpu_freq(PyObject* self, PyObject* args);
PyObject *psutil_cpu_stats(PyObject* self, PyObject* a... | 453 | 33.923077 | 73 | h |
psutil | psutil-master/psutil/arch/freebsd/disk.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <devstat.h>
#include "../../_psutil_common.h"
#include "../../_psutil_posix.h"
... | 2,599 | 28.885057 | 83 | c |
psutil | psutil-master/psutil/arch/freebsd/disk.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_disk_io_counters(PyObject* self, PyObject* args);
| 274 | 26.5 | 73 | h |
psutil | psutil-master/psutil/arch/freebsd/mem.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
#include <vm/vm_param.h>
#include <devsta... | 4,652 | 32.47482 | 81 | c |
psutil | psutil-master/psutil/arch/freebsd/mem.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_swap_mem(PyObject* self, PyObject* args);
PyObject *psutil_virtual_mem(PyObject* self, PyObject*... | 328 | 28.909091 | 73 | h |
psutil | psutil-master/psutil/arch/freebsd/proc.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/ty... | 19,437 | 25.848066 | 79 | c |
psutil | psutil-master/psutil/arch/freebsd/proc.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
typedef struct kinfo_proc kinfo_proc;
int psutil_get_proc_list(struct kinfo_proc **procList, size_t *procCount);... | 1,102 | 43.12 | 74 | h |
psutil | psutil-master/psutil/arch/freebsd/proc_socks.c | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Retrieves per-process open socket connections.
*/
#include <Python.h>
#include <sys/param.h>
#include <sys/user.h>
#include <sys/socketvar.... | 11,001 | 28.495979 | 85 | c |
psutil | psutil-master/psutil/arch/freebsd/proc_socks.h | /*
* Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject* psutil_proc_connections(PyObject* self, PyObject* args);
| 263 | 25.4 | 73 | h |
psutil | psutil-master/psutil/arch/freebsd/sensors.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
Original code was refactored and moved from psutil/arch/freebsd/specific.c
For reference, here's the git history with original(ish)... | 2,329 | 27.072289 | 77 | c |
psutil | psutil-master/psutil/arch/freebsd/sensors.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject* psutil_sensors_battery(PyObject* self, PyObject* args);
PyObject* psutil_sensors_cpu_temperature(PyObje... | 347 | 30.636364 | 73 | h |
psutil | psutil-master/psutil/arch/freebsd/sys_socks.c | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Retrieves system-wide open socket connections. This is based off of
* sockstat utility source code:
* https://github.com/freebsd/freebsd/bl... | 10,147 | 26.576087 | 78 | c |
psutil | psutil-master/psutil/arch/freebsd/sys_socks.h | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject* psutil_net_connections(PyObject* self, PyObject* args);
| 265 | 23.181818 | 73 | h |
psutil | psutil-master/psutil/arch/netbsd/cpu.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sched.h>
#include <sys/sysctl.h>
#include <uvm/uvm_extern.h>
/*
CPU related functions. Orig... | 2,775 | 25.692308 | 77 | c |
psutil | psutil-master/psutil/arch/netbsd/cpu.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_cpu_stats(PyObject *self, PyObject *args);
PyObject *psutil_per_cpu_times(PyObject *self,... | 338 | 27.25 | 73 | h |
psutil | psutil-master/psutil/arch/netbsd/disk.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
Disk related functions. Original code was refactored and moved from
psutil/arch/netbsd/specific.c in 2023 (and was moved in ... | 1,939 | 24.526316 | 74 | c |
psutil | psutil-master/psutil/arch/netbsd/disk.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_disk_io_counters(PyObject *self, PyObject *args);
| 281 | 24.636364 | 73 | h |
psutil | psutil-master/psutil/arch/netbsd/mem.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
Memory related functions. Original code was refactored and moved from
psutil/arch/netbsd/specific.c in 2023 (and was moved i... | 3,428 | 29.078947 | 93 | c |
psutil | psutil-master/psutil/arch/netbsd/mem.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_virtual_mem(PyObject *self, PyObject *args);
PyObject *psutil_swap_mem(PyObject *self, Py... | 335 | 27 | 73 | h |
psutil | psutil-master/psutil/arch/netbsd/proc.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Platform-specific module methods for NetBSD.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <kvm.h>
#include "../.... | 10,328 | 23.889157 | 79 | c |
psutil | psutil-master/psutil/arch/netbsd/proc.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
typedef struct kinfo_proc2 kinfo_proc;
int psutil_kinfo_proc(pid_t pid, kinfo_proc *proc);
struct kinfo_f... | 927 | 37.666667 | 73 | h |
psutil | psutil-master/psutil/arch/netbsd/socks.c | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* Copyright (c) 2015, Ryo ONODERA.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/sysctl.h>
#inc... | 12,007 | 26.478261 | 73 | c |
psutil | psutil-master/psutil/arch/netbsd/socks.h | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* Copyright (c) 2015, Ryo ONODERA.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
PyObject *psutil_proc_connections(PyObject *, PyObject *);
PyObject *psutil_net_connections(PyObject *, Py... | 331 | 29.181818 | 73 | h |
psutil | psutil-master/psutil/arch/openbsd/cpu.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <sys/sched.h> // for CPUSTATES & CP_*
PyObject *
psutil_per_cpu_times(P... | 2,787 | 24.345455 | 77 | c |
psutil | psutil-master/psutil/arch/openbsd/cpu.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_cpu_freq(PyObject* self, PyObject* args);
PyObject *psutil_cpu_stats(PyObject* self, PyOb... | 397 | 29.615385 | 73 | h |
psutil | psutil-master/psutil/arch/openbsd/disk.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <sys/disk.h>
PyObject *
psutil_disk_io_counters(PyObject *self, PyObject... | 1,656 | 23.367647 | 77 | c |
psutil | psutil-master/psutil/arch/openbsd/disk.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_disk_io_counters(PyObject* self, PyObject* args);
| 281 | 24.636364 | 73 | h |
psutil | psutil-master/psutil/arch/openbsd/mem.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
#include <sys/mount.h>
#include <sys/swap.h>
#include <sys... | 3,312 | 26.840336 | 73 | c |
psutil | psutil-master/psutil/arch/openbsd/mem.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_virtual_mem(PyObject *self, PyObject *args);
PyObject *psutil_swap_mem(PyObject *self, Py... | 335 | 27 | 73 | h |
psutil | psutil-master/psutil/arch/openbsd/proc.c | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/proc... | 8,398 | 25.495268 | 81 | c |
psutil | psutil-master/psutil/arch/openbsd/proc.h | /*
* Copyright (c) 2009, Giampaolo Rodola', Landry Breuil.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
typedef struct kinfo_proc kinfo_proc;
int psutil_kinfo_proc(pid_t pid, struct kinfo_proc *proc);
struct k... | 728 | 33.714286 | 74 | h |
psutil | psutil-master/psutil/arch/openbsd/socks.c | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#include <kvm.h>
#define _KERNEL // silence compiler warning
#include <sy... | 4,993 | 26.59116 | 79 | c |
psutil | psutil-master/psutil/arch/openbsd/socks.h | /*
* Copyright (c) 2009, Giampaolo Rodola'.
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
PyObject *psutil_net_connections(PyObject* self, PyObject* args);
| 244 | 26.222222 | 73 | h |
psutil | psutil-master/psutil/arch/osx/cpu.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
System-wide CPU related functions.
Original code was refactored and moved from psutil/_psutil_osx.c in 2020
right before a4c0a0eb0... | 6,233 | 29.558824 | 78 | c |
psutil | psutil-master/psutil/arch/osx/cpu.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_cpu_count_cores(PyObject *self, PyObject *args);
PyObject *psutil_cpu_count_logical(PyObject *se... | 584 | 38 | 73 | h |
psutil | psutil-master/psutil/arch/osx/disk.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Disk related functions. Original code was refactored and moved
// from psutil/_psutil_osx.c in 2023. This is the GIT blame before t... | 12,376 | 31.743386 | 106 | c |
psutil | psutil-master/psutil/arch/osx/disk.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_disk_io_counters(PyObject *self, PyObject *args);
PyObject *psutil_disk_partitions(PyObject *sel... | 406 | 32.916667 | 73 | h |
psutil | psutil-master/psutil/arch/osx/mem.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// System memory related functions. Original code was refactored and moved
// from psutil/_psutil_osx.c in 2023. This is the GIT blame... | 3,221 | 27.263158 | 76 | c |
psutil | psutil-master/psutil/arch/osx/mem.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_swap_mem(PyObject *self, PyObject *args);
PyObject *psutil_virtual_mem(PyObject *self, PyObject ... | 328 | 28.909091 | 73 | h |
psutil | psutil-master/psutil/arch/osx/net.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Networks related functions. Original code was refactored and moved
// from psutil/_psutil_osx.c in 2023. This is the GIT blame befo... | 2,807 | 26.529412 | 76 | c |
psutil | psutil-master/psutil/arch/osx/net.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_net_io_counters(PyObject *self, PyObject *args);
| 273 | 26.4 | 73 | h |
psutil | psutil-master/psutil/arch/osx/proc.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Process related functions. Original code was moved in here from
// psutil/_psutil_osx.c and psutil/arc/osx/process_info.c in 2023.
... | 38,150 | 29.087539 | 124 | c |
psutil | psutil-master/psutil/arch/osx/proc.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_pids(PyObject *self, PyObject *args);
PyObject *psutil_proc_cmdline(PyObject *self, PyObject *ar... | 1,035 | 46.090909 | 74 | h |
psutil | psutil-master/psutil/arch/osx/sensors.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Sensors related functions. Original code was refactored and moved
// from psutil/_psutil_osx.c in 2023. This is the GIT blame befor... | 3,421 | 32.223301 | 77 | c |
psutil | psutil-master/psutil/arch/osx/sensors.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_sensors_battery(PyObject *self, PyObject *args);
| 273 | 26.4 | 73 | h |
psutil | psutil-master/psutil/arch/osx/sys.c | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// System related functions. Original code was refactored and moved
// from psutil/_psutil_osx.c in 2023. This is the GIT blame before... | 2,529 | 27.426966 | 76 | c |
psutil | psutil-master/psutil/arch/osx/sys.h | /*
* Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <Python.h>
PyObject *psutil_boot_time(PyObject *self, PyObject *args);
PyObject *psutil_users(PyObject *self, PyObject *args... | 323 | 28.454545 | 73 | h |