Skip to main content
Glama
ajragusa

perfsonar-mcp

by ajragusa

schedule_rtt_test

Schedule network latency tests by configuring ping measurements to a destination host using pScheduler.

Instructions

Schedule an RTT (ping) test using pScheduler.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
destYesDestination host
countNoNumber of pings

Implementation Reference

  • The core implementation of the RTT test scheduling logic, which interacts with the pScheduler service.
    async def schedule_rtt_test(
        self, dest: str, count: int = 10, slip: str = "PT10M"
    ) -> PSchedulerTaskResponse:
        """
        Schedule an RTT (round-trip time) test
    
        Args:
            dest: Destination host
            count: Number of pings
            slip: Schedule slip time in ISO 8601 format (e.g., PT10M for 10 minutes)
    
        Returns:
            Task response
        """
        logger.info(f"Scheduling RTT test to {dest} ({count} pings)")
    
        # For RTT tests, schedule on the destination since it measures from local to dest
        scheduler_url = f"https://{dest}/pscheduler"
        logger.info(f"Using pScheduler at: {scheduler_url}")
    
        test_spec = RTTTestSpec(dest=dest, count=count)
    
        task_request = PSchedulerTaskRequest(
            test=PSchedulerTestSpec(type="rtt", spec=test_spec.model_dump(exclude_none=True)),
            schedule={"slip": slip},
        )
    
        # Create a temporary client for this specific scheduler
        client = PSchedulerClient(scheduler_url)
        try:
            return await client.create_task(task_request)
  • The MCP-exposed wrapper function for scheduling RTT tests.
    async def schedule_rtt_test(
        dest: str,
        count: int = 10,
        slip: str = "PT10M",
    ) -> str:
        """Schedule an RTT (ping) test using pScheduler.
    
        Args:
            dest: Destination host for the test
            count: Number of pings (default: 10)
            slip: Schedule slip time in ISO 8601 format (e.g., 'PT10M' for 10 minutes)
    
        Returns:
            JSON string with test details including run URL for status checks
        """
        result = await pscheduler_client.schedule_rtt_test(dest, count, slip)
        return json.dumps(result.model_dump(), indent=2)
  • Registration of the schedule_rtt_test tool in the MCP server.
    Tool(
        name="schedule_rtt_test",
        description="Schedule an RTT (ping) test using pScheduler.",
        inputSchema={
            "type": "object",
            "properties": {
                "dest": {"type": "string", "description": "Destination host"},

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ajragusa/perfsonar-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server