---
sourceDocument: Référence de l’API Xanadu
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/fr-FR/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - fr-FR

ft:publication_title :

    - Référence de l’API Xanadu

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# LSOFParser - Global

# LSOFParser - Global {#ariaid-title1}

* Rversion finale: Xanadu
* 
* Mis à jour 1 août 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute de lecture

L'include de script LSOFParser fournit des méthodes pour analyser la sortie de la commande lsof : `lsof -i4TCP -n -P -F pcnfT`.

Utilisez cet include de script avec un script de détection lorsque vous avez besoin d'analyser la sortie lsof .

## LSOFParser : erreur (message de chaîne) {#ariaid-title2}

Génère le message d'erreur spécifié.
{#r_LSOFP-error_S__table_s4s_td2_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| msg | Chaîne | Message d'erreur |
[Tableau 1. Paramètres]

{#r_LSOFP-error_S__table_s4s_td2_5t} {#r_LSOFP-error_S__table_t4s_td2_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 2. Renvoie]

{#r_LSOFP-error_S__table_t4s_td2_5t}

## LSOFParser : initFileDescriptor() {#ariaid-title3}

Initialise le processus de descripteur de fichier.
{#r_LSOFP-initFileDescriptor__table_j5f_kd2_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 3. Paramètres]

{#r_LSOFP-initFileDescriptor__table_j5f_kd2_5t} {#r_LSOFP-initFileDescriptor__table_k5f_kd2_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 4. Renvoie]

{#r_LSOFP-initFileDescriptor__table_k5f_kd2_5t}

## LSOFParser : initProcess() {#ariaid-title4}

Initialise le processus de l'analyseur.
{#r_LSOFP-initProcess__table_omf_cd2_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 5. Paramètres]

{#r_LSOFP-initProcess__table_omf_cd2_5t} {#r_LSOFP-initProcess__table_pmf_cd2_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 6. Renvoie]

{#r_LSOFP-initProcess__table_pmf_cd2_5t}

## LSOFParser - on_c(ligne de chaîne) {#ariaid-title5}

Définit la commande actuelle.
{#r_LSOFP-on_c_S__table_wqf_fb2_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| ligne | Chaîne | La commande |
[Tableau 7. Paramètres]

{#r_LSOFP-on_c_S__table_wqf_fb2_5t} {#r_LSOFP-on_c_S__table_xqf_fb2_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 8. Renvoie]

{#r_LSOFP-on_c_S__table_xqf_fb2_5t}

## LSOFParser - on_endFileDescriptor() {#ariaid-title6}

Ferme le processus de descripteur de fichier.
{#r_LSOFP-on_endFileDescriptor__table_eqx_nc2_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 9. Paramètres]

{#r_LSOFP-on_endFileDescriptor__table_eqx_nc2_5t} {#r_LSOFP-on_endFileDescriptor__table_fqx_nc2_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 10. Renvoie]

{#r_LSOFP-on_endFileDescriptor__table_fqx_nc2_5t}

## LSOFParser - on_endProcess() {#ariaid-title7}

Ferme le processus de l'analyseur.
{#r_LSOFP-on_endProcess__table_ogc_vc2_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| Aucun |   |   |
[Tableau 11. Paramètres]

{#r_LSOFP-on_endProcess__table_ogc_vc2_5t} {#r_LSOFP-on_endProcess__table_pgc_vc2_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 12. Renvoie]

{#r_LSOFP-on_endProcess__table_pgc_vc2_5t}

## LSOFParser - on_f(ligne de chaîne) {#ariaid-title8}

Définit le descripteur de fichier actuel.
{#r_LSOFP-on_f_S__table_ywq_nb2_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| ligne | Chaîne | Descripteur de fichier |
[Tableau 13. Paramètres]

{#r_LSOFP-on_f_S__table_ywq_nb2_5t} {#r_LSOFP-on_f_S__table_zwq_nb2_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 14. Renvoie]

{#r_LSOFP-on_f_S__table_zwq_nb2_5t}

## LSOFParser - on_n(ligne de chaîne) {#ariaid-title9}

Définit l'adresse actuelle.
{#r_LSOFP-on_n_S__table_lx3_vb2_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| ligne | Chaîne | L'adresse |
[Tableau 15. Paramètres]

{#r_LSOFP-on_n_S__table_lx3_vb2_5t} {#r_LSOFP-on_n_S__table_mx3_vb2_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 16. Renvoie]

{#r_LSOFP-on_n_S__table_mx3_vb2_5t}

## LSOFParser - on_p(ligne de chaîne) {#ariaid-title10}

Définit le PID actuel.
{#r_LSOFP-on_p_S__table_sm5_v12_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| ligne | Chaîne | Le PID |
[Tableau 17. Paramètres]

{#r_LSOFP-on_p_S__table_sm5_v12_5t} {#r_LSOFP-on_p_S__table_tm5_v12_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 18. Renvoie]

{#r_LSOFP-on_p_S__table_tm5_v12_5t}

## LSOFParser - on_T(ligne de chaîne) {#ariaid-title11}

Définit l'état actuel.
{#r_LSOFP-on_T_S__table_x2h_fc2_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| ligne | Chaîne | L'état |
[Tableau 19. Paramètres]

{#r_LSOFP-on_T_S__table_x2h_fc2_5t} {#r_LSOFP-on_T_S__table_y2h_fc2_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 20. Renvoie]

{#r_LSOFP-on_T_S__table_y2h_fc2_5t}

## LSOFParser : parse(String lsofOutput) {#ariaid-title12}

Analyse la sortie `lsof` spécifiée.
Les résultats sont disponibles dans les tableaux de connexions et d'écouteurs, et les erreurs sont enregistrées dans errorString() et isValid().
{#r_LSOFP-parse_S__table_lbn_g12_5t__entry__3}

| Nom | Type | Description |
|-|-|-|
| lsofSortie | Chaîne | La sortie `lsof` |
[Tableau 21. Paramètres]

{#r_LSOFP-parse_S__table_lbn_g12_5t} {#r_LSOFP-parse_S__table_mbn_g12_5t__entry__2}

| Type | Description |
|-|-|
| nul |   |
[Tableau 22. Renvoie]

{#r_LSOFP-parse_S__table_mbn_g12_5t}

