usertools.rar

  • Vedin
    了解作者
  • Python
    开发工具
  • 19KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 10 积分
    下载积分
  • 0
    下载次数
  • 2020-05-07 05:33
    上传日期
sample of rtsp stremer for NVR systems
usertools.rar
  • usertools
  • dpdk-setup.sh
    12.8KB
  • meson.build
    152B
  • dpdk-pmdinfo.py
    19.8KB
  • dpdk-devbind.py
    27.6KB
  • dpdk-telemetry-client.py
    4.7KB
  • cpu_layout.py
    2.1KB
内容介绍
#! /usr/bin/env python # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # from __future__ import print_function import sys import os import getopt import subprocess from os.path import exists, abspath, dirname, basename # The PCI base class for all devices network_class = {'Class': '02', 'Vendor': None, 'Device': None, 'SVendor': None, 'SDevice': None} acceleration_class = {'Class': '12', 'Vendor': None, 'Device': None, 'SVendor': None, 'SDevice': None} ifpga_class = {'Class': '12', 'Vendor': '8086', 'Device': '0b30', 'SVendor': None, 'SDevice': None} encryption_class = {'Class': '10', 'Vendor': None, 'Device': None, 'SVendor': None, 'SDevice': None} intel_processor_class = {'Class': '0b', 'Vendor': '8086', 'Device': None, 'SVendor': None, 'SDevice': None} cavium_sso = {'Class': '08', 'Vendor': '177d', 'Device': 'a04b,a04d', 'SVendor': None, 'SDevice': None} cavium_fpa = {'Class': '08', 'Vendor': '177d', 'Device': 'a053', 'SVendor': None, 'SDevice': None} cavium_pkx = {'Class': '08', 'Vendor': '177d', 'Device': 'a0dd,a049', 'SVendor': None, 'SDevice': None} cavium_tim = {'Class': '08', 'Vendor': '177d', 'Device': 'a051', 'SVendor': None, 'SDevice': None} cavium_zip = {'Class': '12', 'Vendor': '177d', 'Device': 'a037', 'SVendor': None, 'SDevice': None} avp_vnic = {'Class': '05', 'Vendor': '1af4', 'Device': '1110', 'SVendor': None, 'SDevice': None} octeontx2_sso = {'Class': '08', 'Vendor': '177d', 'Device': 'a0f9,a0fa', 'SVendor': None, 'SDevice': None} octeontx2_npa = {'Class': '08', 'Vendor': '177d', 'Device': 'a0fb,a0fc', 'SVendor': None, 'SDevice': None} octeontx2_dma = {'Class': '08', 'Vendor': '177d', 'Device': 'a081', 'SVendor': None, 'SDevice': None} intel_ioat_bdw = {'Class': '08', 'Vendor': '8086', 'Device': '6f20,6f21,6f22,6f23,6f24,6f25,6f26,6f27,6f2e,6f2f', 'SVendor': None, 'SDevice': None} intel_ioat_skx = {'Class': '08', 'Vendor': '8086', 'Device': '2021', 'SVendor': None, 'SDevice': None} intel_ntb_skx = {'Class': '06', 'Vendor': '8086', 'Device': '201c', 'SVendor': None, 'SDevice': None} network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class] baseband_devices = [acceleration_class] crypto_devices = [encryption_class, intel_processor_class] eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso] mempool_devices = [cavium_fpa, octeontx2_npa] compress_devices = [cavium_zip] misc_devices = [intel_ioat_bdw, intel_ioat_skx, intel_ntb_skx, octeontx2_dma] # global dict ethernet devices present. Dictionary indexed by PCI address. # Each device within this is itself a dictionary of device properties devices = {} # list of supported DPDK drivers dpdk_drivers = ["igb_uio", "vfio-pci", "uio_pci_generic"] # list of currently loaded kernel modules loaded_modules = None # command-line arg flags b_flag = None status_flag = False force_flag = False args = [] def usage(): '''Print usage information for the program''' argv0 = basename(sys.argv[0]) print(""" Usage: ------ %(argv0)s [options] DEVICE1 DEVICE2 .... where DEVICE1, DEVICE2 etc, are specified via PCI "domain:bus:slot.func" syntax or "bus:slot.func" syntax. For devices bound to Linux kernel drivers, they may also be referred to by Linux interface name e.g. eth0, eth1, em0, em1, etc. Options: --help, --usage: Display usage information and quit -s, --status: Print the current status of all known network, crypto, event and mempool devices. For each device, it displays the PCI domain, bus, slot and function, along with a text description of the device. Depending upon whether the device is being used by a kernel driver, the igb_uio driver, or no driver, other relevant information will be displayed: * the Linux interface name e.g. if=eth0 * the driver being used e.g. drv=igb_uio * any suitable drivers not currently using that device e.g. unused=igb_uio NOTE: if this flag is passed along with a bind/unbind option, the status display will always occur after the other operations have taken place. --status-dev: Print the status of given device group. Supported device groups are: "net", "baseband", "crypto", "event", "mempool" and "compress" -b driver, --bind=driver: Select the driver to use or \"none\" to unbind the device -u, --unbind: Unbind a device (Equivalent to \"-b none\") --force: By default, network devices which are used by Linux - as indicated by having routes in the routing table - cannot be modified. Using the --force flag overrides this behavior, allowing active links to be forcibly unbound. WARNING: This can lead to loss of network connection and should be used with caution. Examples: --------- To display current device status: %(argv0)s --status To display current network device status: %(argv0)s --status-dev net To bind eth1 from the current driver and move to use igb_uio %(argv0)s --bind=igb_uio eth1 To unbind 0000:01:00.0 from using any driver %(argv0)s -u 0000:01:00.0 To bind 0000:02:00.0 and 0000:02:00.1 to the ixgbe kernel driver %(argv0)s -b ixgbe 02:00.0 02:00.1 """ % locals()) # replace items from local variables # This is roughly compatible with check_output function in subprocess module # which is only available in python 2.7. def check_output(args, stderr=None): '''Run a command and capture its output''' return subprocess.Popen(args, stdout=subprocess.PIPE, stderr=stderr).communicate()[0] # check if a specific kernel module is loaded def module_is_loaded(module): global loaded_modules if module == 'vfio_pci': module = 'vfio-pci' if loaded_modules: return module in loaded_modules # Get list of sysfs modules (both built-in and dynamically loaded) sysfs_path = '/sys/module/' # Get the list of directories in sysfs_path sysfs_mods = [m for m in os.listdir(sysfs_path) if os.path.isdir(os.path.join(sysfs_path, m))] # special case for vfio_pci (module is named vfio-pci, # but its .ko is named vfio_pci) sysfs_mods = [a if a != 'vfio_pci' else 'vfio-pci' for a in sysfs_mods] loaded_modules = sysfs_mods return module in sysfs_mods def check_modules(): '''Checks that igb_uio is loaded''' global dpdk_drivers # list of supported modules mods = [{"Name": driver, "Found": False} for driver in dpdk_drivers] # first check if module is loaded for mod in mods: if module_is_loaded(mod["Name"]): mod["Found"] = True # check if we have at least one loaded module if True not in [mod["Found"] for mod in mods] and b_flag is not None: print("Warning: no supported DPDK kernel modules are loaded", file=sys.stderr) # change DPDK driver list to only contain drivers that are loaded dpdk_drivers = [mod["Name"] for mod in mods if mod["Found"]] def has_driver(dev_id): '''return true if a device is assigned to a driver. False otherwise''' return "Driver_str" in devices[dev_id] def get_pci_device_details(dev_id, probe_lspci): '''This function gets additional details for a PCI device''' device = {} if probe_lspci: extra_info = check_output(["lspci", "-vmmks", dev_id]).splitlines() # parse lspci details for line in extra_info: if len(line) == 0: continue name, value = line.decode().split("\t", 1) name = name.strip(":") + "_str" device[name] = value # check for a unix interface name devic
评论
    相关推荐
    • hikvision_cam_rtsp_sub-stream.zip
      This script allow you to run at fullscreen in vlc your hikvision camera NVR/DVR/Standalone Camera Only edit the bat file, change username, password and ip address.
    • 国标28181平台支持上下级级联支持rtsp/rtmp/HLS输出
      1、支持国标GB28181平台、国标GB28181 IPC和国标GB28181 NVR设备同时接入 (支持GB28181-2011版本和GB28181-2016版本)  2、支持国标GB28181设备注册和注销,对所有设备进行管理,获取资源 对资源列表进行管理  ...
    • Rust 中的高级 RTSP 多媒体流库
      良好支持 ONVIF RTSP/1.0 IP 监控摄像机,满足Moonfire NVR 的需要。解决廉价闭源相机的损坏问题。进步:客户支持摘要认证。RTP over TCP 通过 RTSP 交错通道。基于 UDP 的 RTP。RTSP/1.0。RTSP/2.0。SRTP。ONVIF ...
    • EasyPlayer-RTSP-Win-master.zip
      EasyPlayer-RTSP-Win-master。 EasyPlayer windows源码,喜欢的可以下载
    • 国标28181转rtsp服务管理平台
      1、支持国标28181平台、国标28181 IPC和国标28181 NVR设备同时接入 2、支持国标28181设备注册和注销,对所有设备进行管理,获取资源 对资源列表进行管理 3、支持国标28181的目录订阅,对接收的订阅通知进行处理 ...
    • rtsp:摄像机和NVRRTSP网址路径
      rtsp 此存储库包含摄像机和NVR的列表及其配置命令。 Paths.csv paths.csv文件包含。 Configs.csv configs.csv文件包含configs.csv文件中描述的摄像机的。 笔记 Box用于连接到摄像机或NVR的默认流/频道是列出的第...
    • 一个可立即运行的模拟RTSP流的RTSP流服务器
      操作简单,运行RTSPServer.exe即可模拟RTSP
    • viseron:具有对象检测功能的自托管NVR
      Viseron-具有对象检测功能的自托管NVR Viseron是使用Python实现的自托管,仅限本地NVR。...对RTSP和MJPEG的本机支持 支持不同平台上的硬件加速 CUDA用于具有受支持GPU的系统 OpenCL的 RaspberryPi 3B +
    • hikvision_camera_rtsp_mainstream.rar
      Script to run a Hikvision Camera (DVR/NVR/Standalone) on RTSP Protocol with VLC in fullscreen mode. Only Edit username and Password
    • 3D机房.zip
      不多说,上干货 ! 风靡的3D机房具体实现,目前主要提供有以下管理功能:设备资产管理、机房空间统计、机房功耗统计、机房载重统计、场景可视化温度云、机房高级搜索、机房设备空间搜索、机房动环监控、机房链路管理。