Monitorear y ahorrar espacio en disco con Laravel

Helper ligero para Laravel 10 que calcula el tamaño de cada carpeta en storage, muestra tamaños en bytes y formatos legibles y permite ordenar. Ideal para monitorizar el espacio y automatizar limpiezas.

10 sept 2025 • 2 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

Cuando trabajas en proyectos Laravel es fundamental vigilar el uso del espacio en disco del servidor para evitar sorpresas cuando el servidor se queda sin espacio. Aquí presentamos un helper ligero para Laravel que facilita este control y te permite identificar rápidamente qué carpetas dentro de storage consumen más espacio.

Este helper realiza tres tareas clave: calcula el tamaño de cada carpeta dentro de storage, muestra tanto el tamaño en bruto en bytes como un formato legible para humanos en KB MB GB y permite ordenar los resultados de forma ascendente o descendente. Es una herramienta muy útil en entornos productivos para localizar logs temporales cachés u otros directorios que crecen sin control.

El código funciona a partir de Laravel 10 y es completamente personalizable. Puedes integrarlo como un comando artisan o como una ruta protegida para administración y usar los resultados para limpiar carpetas específicas automatizar tareas de mantenimiento o avisar cuando se superan umbrales definidos.

Además de ahorrar tiempo en depuración esta utilidad forma parte de buenas prácticas de operación y mantenimiento en proyectos a medida. En Q2BSTUDIO somos especialistas en desarrollo de software y aplicaciones a medida y podemos ayudarte a integrar soluciones como esta en pipelines de despliegue automatizados o en monitorización continua. Conoce más sobre nuestras opciones de desarrollo de aplicaciones y software a medida en desarrollo de aplicaciones y software a medida.

Nuestros servicios también incluyen arquitectura y despliegue en la nube para garantizar que tus servidores y aplicaciones escalen de forma segura y eficiente. Si necesitas migrar optimizar o asegurar entornos cloud trabajamos con servicios cloud aws y azure para ofrecer alta disponibilidad copia de seguridad y monitorización proactiva.

En Q2BSTUDIO contamos con experiencia en inteligencia artificial ia para empresas agentes IA y soluciones de inteligencia de negocio power bi que pueden complementar la monitorización con análisis predictivo y alertas inteligentes. También ofrecemos servicios de ciberseguridad y pentesting para proteger datos y sistemas críticos evitando que incidentes de seguridad agraven problemas de capacidad o disponibilidad.

Palabras clave relevantes que trabajamos y te ayudarán a mejorar la gestión de tu infraestructura incluyen aplicaciones a medida software a medida inteligencia artificial ciberseguridad servicios cloud aws y azure servicios inteligencia de negocio ia para empresas agentes IA y power bi. Si quieres que implementemos este helper adaptemos su comportamiento o lo integremos en un sistema de mantenimiento completo contáctanos y te mostraremos soluciones a medida.

Esta pequeña utilidad es práctica y ahorra horas de investigación cuando el disco se llena en servidores en producción. Si te resulta útil comparte la idea con tu red para que otros equipos también puedan prevenir problemas de espacio en disco y optimizar sus sistemas.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.