标签:linu str add csdn sni opp 原因 elf and
#! /usr/bin/env stap global host_no = 17 global channel = 0 global targetid = 0 global lunid = 15 # 推断io是否下发到iscsi probe module("libiscsi").function("iscsi_queuecommand") { if ( $host!=0 && $sc!=0 ) { if ( $host->host_no==host_no && $sc->device->channel==channel && $sc->device->id==targetid && $sc->device->lun==lunid ) { printf("====================send scsi=======================\n") printf("tag = %d\n", $sc->tag) printf("serial_number = %lu\n", $sc->serial_number) printf("jiffies_at_alloc = %lu\n", $sc->jiffies_at_alloc) print_backtrace() printf("\n") } } } probe kernel.function("do_sync_read") { if ($filp!=0) { if ($filp->f_inode!=0) { if ($filp->f_inode->i_ino == 3978543828) { printf("===========================================do_sync_read\n\n") } } } } # 推断IO在iscsi被正确下发 probe module("libiscsi").statement("iscsi_queuecommand@libiscsi.c:1690") { if ( $host!=0 && $sc!=0 ) { if ( $host->host_no==host_no && $sc->device->channel==channel && $sc->device->id==targetid && $sc->device->lun==lunid ) { printf("====================cmd sended=======================\n") printf("reason=%d\n", $reason) printf("\n") } } } # 推断IO是否返回 probe module("libiscsi").function("__iscsi_put_task") { if ($task != 0) { if ($task->sc != 0) { if ( $task->sc->device->host->host_no==host_no && $task->sc->device->channel==channel && $task->sc->device->id==targetid && $task->sc->device->lun==lunid ) { printf("*************************recv scsi********************\n") printf("tag = %d\n", $task->sc->tag) printf("serial_number = %lu\n", $task->sc->serial_number) printf("jiffies_at_alloc = %lu\n", $task->sc->jiffies_at_alloc) print_backtrace() printf("\n") } } } }
标签:linu str add csdn sni opp 原因 elf and
原文地址:http://www.cnblogs.com/tlnshuju/p/7259927.html